summaryrefslogtreecommitdiff
path: root/src/controls/TextField.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/controls/TextField.qml')
-rw-r--r--src/controls/TextField.qml10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/controls/TextField.qml b/src/controls/TextField.qml
index dfadd78d..f74c6ed0 100644
--- a/src/controls/TextField.qml
+++ b/src/controls/TextField.qml
@@ -49,11 +49,19 @@ import QtQuick.Controls.Private 1.0
\ingroup controls
\brief Displays a single line of editable plain text.
+ \image textfield.png
+
TextField is used to accept a line of text input. Input constraints can be
placed on a TextField item (for example, through a \l validator or \l
inputMask). Setting \l echoMode to an appropriate value enables
TextField to be used for a password input field.
+ \qml
+ TextField {
+ placeholderText: qsTr("Enter name")
+ }
+ \endqml
+
You can create a custom appearance for a TextField by
assigning a \l {QtQuick.Controls.Styles::TextFieldStyle}{TextFieldStyle}.
@@ -293,7 +301,7 @@ Control {
\li Qt.ImhExclusiveInputMask - This mask yields nonzero if any of the exclusive flags are used.
\endlist
*/
- property alias inputMethodHints: textInput.inputMethodHints
+ property int inputMethodHints: textInput.inputMethodHints || Qt.ImhNone
/*!
\qmlproperty int TextField::length