summaryrefslogtreecommitdiffstats
path: root/basicsuite/textinput/TextField.qml
diff options
context:
space:
mode:
authorRainer Keller <rainer.keller@digia.com>2014-05-13 08:51:52 +0200
committerRainer Keller <rainer.keller@digia.com>2014-05-13 13:09:53 +0300
commit929a87255d3e92a3b49299104d53f041c1d4f5a3 (patch)
treeb3fee2f3c3954ea7ff888b3aa18dc4785eeb7338 /basicsuite/textinput/TextField.qml
parent970e4ef386ea26dd9f475ae17d51aff98970308d (diff)
Change text input demo to match virtual keyboard 1.0 API
Change-Id: I331138272037cd627e74cbcb7fd5cca99e019fb6 Reviewed-by: Kalle Viironen <kalle.viironen@digia.com>
Diffstat (limited to 'basicsuite/textinput/TextField.qml')
-rw-r--r--basicsuite/textinput/TextField.qml14
1 files changed, 12 insertions, 2 deletions
diff --git a/basicsuite/textinput/TextField.qml b/basicsuite/textinput/TextField.qml
index e95ded7..b3671d7 100644
--- a/basicsuite/textinput/TextField.qml
+++ b/basicsuite/textinput/TextField.qml
@@ -40,6 +40,7 @@
****************************************************************************/
import QtQuick 2.0
+import QtQuick.Enterprise.VirtualKeyboard 1.0
TextBase {
id: textField
@@ -51,6 +52,7 @@ TextBase {
property alias inputMethodHints: textInput.inputMethodHints
property alias validator: textInput.validator
property alias echoMode: textInput.echoMode
+ property int passwordMaskDelay: 1000
editor: textInput
mouseParent: flickable
@@ -70,8 +72,9 @@ TextBase {
TextInput {
id: textInput
- property alias enterKeyText: textField.enterKeyText
- property alias enterKeyEnabled: textField.enterKeyEnabled
+ EnterKeyAction.actionId: textField.enterKeyAction
+ EnterKeyAction.label: textField.enterKeyText
+ EnterKeyAction.enabled: textField.enterKeyEnabled
y: 6
focus: true
@@ -83,6 +86,13 @@ TextBase {
selectedTextColor: Qt.rgba(0.0, 0.0, 0.0, 0.8)
width: Math.max(flickable.width, implicitWidth)-2
onActiveFocusChanged: if (!activeFocus) deselect()
+
+ Binding {
+ target: textInput
+ property: "passwordMaskDelay"
+ value: textField.passwordMaskDelay
+ when: textInput.hasOwnProperty("passwordMaskDelay")
+ }
}
}
}