summaryrefslogtreecommitdiff
path: root/src/controls/TextField.qml
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@digia.com>2014-01-21 13:07:21 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-01-22 16:09:31 +0100
commit5dc805c86077ee9cd10af530f802fdda879cfb6a (patch)
tree44a13a83b6e79d0e81420b2167eaf20b018f01c6 /src/controls/TextField.qml
parent5e022a65531b92d4d2f4cf9a0dd6b843aadf3797 (diff)
downloadqtquickcontrols-5dc805c86077ee9cd10af530f802fdda879cfb6a.tar.gz
Controls: Fixed support for Keys attached property on controls allowing text input
By forwarding key events from the internal control. It includes TextField, TextArea, ComboBox, SpinBox. The key events from internal are Keys.forwardTo controls, then user could customize their own behavior for those controls. Autotest are included. [ChangeLog][QtQuickControls] Fixed support for Keys attached property on controls allowing text input, by forwarding key events from the internal control. Task-number: QTBUG-33493 Task-number: QTBUG-34101 Task-number: QTBUG-35763 Change-Id: I00ea131160e55048b34fe0713e1ee02ff9472f05 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com> Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src/controls/TextField.qml')
-rw-r--r--src/controls/TextField.qml2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/controls/TextField.qml b/src/controls/TextField.qml
index ba380b68..d9ba3625 100644
--- a/src/controls/TextField.qml
+++ b/src/controls/TextField.qml
@@ -598,6 +598,8 @@ Control {
renderType: __style ? __style.renderType : Text.NativeRendering
+ Keys.forwardTo: textfield
+
onAccepted: {
Qt.inputMethod.commit()
Qt.inputMethod.hide()