diff options
author | Jarkko Koivikko <jarkko.koivikko@code-q.fi> | 2018-08-22 09:29:53 +0300 |
---|---|---|
committer | Jarkko Koivikko <jarkko.koivikko@code-q.fi> | 2018-08-23 08:59:09 +0000 |
commit | 726832a05c4400159d524b6f508cd25bf66da305 (patch) | |
tree | b5ce88417395a282a9f152b9a8621c6d158405fc /examples | |
parent | e145ed654f7bdb76d2831e4e5b689d95218105c5 (diff) |
Fix EnterKey attached type
EnterKey attached type has been broken since converting the Basic app
to QuickControls2.
Change-Id: If7a645b7706f6fc322b3cc39122b668cb88308ec
Reviewed-by: Jarkko Koivikko <jarkko.koivikko@code-q.fi>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/virtualkeyboard/basic/content/TextArea.qml | 3 | ||||
-rw-r--r-- | examples/virtualkeyboard/basic/content/TextField.qml | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/examples/virtualkeyboard/basic/content/TextArea.qml b/examples/virtualkeyboard/basic/content/TextArea.qml index ecc05758..899882ab 100644 --- a/examples/virtualkeyboard/basic/content/TextArea.qml +++ b/examples/virtualkeyboard/basic/content/TextArea.qml @@ -42,6 +42,9 @@ Controls.TextArea { property int enterKeyAction: EnterKeyAction.None readonly property bool enterKeyEnabled: enterKeyAction === EnterKeyAction.None || text.length > 0 || inputMethodComposing + EnterKeyAction.actionId: control.enterKeyAction + EnterKeyAction.enabled: control.enterKeyEnabled + background: Rectangle { color: "#FFFFFF" border.width: 1 diff --git a/examples/virtualkeyboard/basic/content/TextField.qml b/examples/virtualkeyboard/basic/content/TextField.qml index faefad20..6ce4f61c 100644 --- a/examples/virtualkeyboard/basic/content/TextField.qml +++ b/examples/virtualkeyboard/basic/content/TextField.qml @@ -40,7 +40,10 @@ Controls.TextField { font.pixelSize: Qt.application.font.pixelSize * 2 property int enterKeyAction: EnterKeyAction.None - readonly property bool enterKeyEnabled: enterKeyAction === EnterKeyAction.None || text.length > 0 || inputMethodComposing + readonly property bool enterKeyEnabled: enterKeyAction === EnterKeyAction.None || acceptableInput || inputMethodComposing + + EnterKeyAction.actionId: control.enterKeyAction + EnterKeyAction.enabled: control.enterKeyEnabled background: Rectangle { color: "#FFFFFF" |