summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@digia.com>2013-11-06 00:51:57 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-11-06 02:02:30 +0100
commit09c931e2abab0bdc7344d6fa83fb7083c3b340ea (patch)
treed6cba9d7b594ef74aeb536a7dcb1995b0fd96835
parent792bb911bb5a2af6f00b3d32c654579a700257c6 (diff)
downloadqtquickcontrols-09c931e2abab0bdc7344d6fa83fb7083c3b340ea.tar.gz
Fix input method committing
On mobile devices the virtual keyboard would in some situations not have words committed yet - this leads to the last word after a space being cut off when querying for the text property. Change-Id: I23d81154f3bed1dd287f24c3c5f958cf4335475c Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
-rw-r--r--src/controls/TextField.qml6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/controls/TextField.qml b/src/controls/TextField.qml
index 006ab7dc..c1e3ddab 100644
--- a/src/controls/TextField.qml
+++ b/src/controls/TextField.qml
@@ -586,6 +586,10 @@ Control {
renderType: __style ? __style.renderType : Text.NativeRendering
- onAccepted: textfield.accepted()
+ onAccepted: {
+ Qt.inputMethod.commit()
+ Qt.inputMethod.hide()
+ textfield.accepted()
+ }
}
}