aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktextinput.cpp
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2020-01-27 15:05:11 +0100
committerMitch Curtis <mitch.curtis@qt.io>2020-01-28 11:54:39 +0100
commitdeac8afcbf28ebe621ec3b8495ca1c9ad76843a5 (patch)
tree5fcafe9288587cbd0d85cdd50fca4ecbacdfdc39 /src/quick/items/qquicktextinput.cpp
parentc32c5879fd0529da76cf3427f94a56212f8ab155 (diff)
Doc: document behavior and caveats of TextInput's padding properties
Task-number: QTBUG-80699 Task-number: QTBUG-81679 Change-Id: I9c936a020ffa358dfa97d9b7044a90a27d3336dc Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'src/quick/items/qquicktextinput.cpp')
-rw-r--r--src/quick/items/qquicktextinput.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp
index cd4f2eebc6..11a6600b74 100644
--- a/src/quick/items/qquicktextinput.cpp
+++ b/src/quick/items/qquicktextinput.cpp
@@ -4695,6 +4695,18 @@ void QQuickTextInput::clear()
These properties hold the padding around the content. This space is reserved
in addition to the contentWidth and contentHeight.
+
+ The individual padding properties assume the value of the \c padding
+ property unless they are set explicitly. For example, if \c padding is
+ set to \c 4 and \c leftPadding to \c 8, \c 8 will be used as the left
+ padding.
+
+ \note If an explicit width or height is given to a TextInput, care must be
+ taken to ensure it is large enough to accommodate the relevant padding
+ values. For example: if \c topPadding and \c bottomPadding are set to
+ \c 10, but the height of the TextInput is only set to \c 20, the text will
+ not have enough vertical space in which to be rendered, and will appear
+ clipped.
*/
qreal QQuickTextInput::padding() const
{