summaryrefslogtreecommitdiff
path: root/src/controls/TextField.qml
diff options
context:
space:
mode:
authorJens Bache-Wiig <jens.bache-wiig@digia.com>2013-04-08 16:16:18 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-08 17:45:23 +0200
commite316ae96958b0aa5e95fb308be8419d3fadc2319 (patch)
treea20c171bfe91d566f0a71411f8b9731fb18d6308 /src/controls/TextField.qml
parent2dd9ce1cf6549565b0f57d6663798bd25412506c (diff)
downloadqtquickcontrols-e316ae96958b0aa5e95fb308be8419d3fadc2319.tar.gz
Make it possible to use forceActiveFocus on TextField
I believe the manual forceActive focus is no longer necessary since TextField is now a focus scope and it is enough to set the focus property on the TextInput. Without this patch, calling foceActiveFocus does not actually give the text cursor focus. Change-Id: I2dda5c7c0e9511f0d8b6817dcd7b78230e6cb823 Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Diffstat (limited to 'src/controls/TextField.qml')
-rw-r--r--src/controls/TextField.qml6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/controls/TextField.qml b/src/controls/TextField.qml
index b53dd8f9..9ec60fd5 100644
--- a/src/controls/TextField.qml
+++ b/src/controls/TextField.qml
@@ -532,11 +532,6 @@ Control {
style: Qt.createComponent(Settings.THEME_PATH + "/TextFieldStyle.qml", textInput)
- onFocusChanged: {
- if (textfield.activeFocus)
- textInput.forceActiveFocus();
- }
-
activeFocusOnTab: true
Accessible.name: text
@@ -553,6 +548,7 @@ Control {
TextInput {
id: textInput
+ focus: true
selectByMouse: true
selectionColor: __panel ? __panel.selectionColor : "darkred"
selectedTextColor: __panel ? __panel.selectedTextColor : "white"