From f49aa13a1bb59eaebdb958305f479dc6e7c8e857 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Fri, 5 Nov 2010 11:19:05 +1000 Subject: Fix samegame text input focus The real problem is QTBUG-15047, but by implementing SameGame in a different way it gets worked around very nicely. Task-number: QTBUG-14716 --- demos/declarative/samegame/samegame.qml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/demos/declarative/samegame/samegame.qml b/demos/declarative/samegame/samegame.qml index b66c5a6..ab49c04 100644 --- a/demos/declarative/samegame/samegame.qml +++ b/demos/declarative/samegame/samegame.qml @@ -92,9 +92,7 @@ Rectangle { enabled: nameInputDialog.initialWidth != 0 } - onOpened: nameInputText.focus = true; onClosed: { - nameInputText.focus = false; if (nameInputText.text != "") Logic.saveHighScore(nameInputText.text); } @@ -116,7 +114,7 @@ Rectangle { TextInput { id: nameInputText anchors { verticalCenter: parent.verticalCenter; left: dialogText.right } - focus: false + focus: visible autoScroll: false maximumLength: 24 onTextChanged: { -- cgit v0.12