summaryrefslogtreecommitdiffstats
path: root/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-06-14 02:14:28 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-06-14 02:14:28 (GMT)
commit1f27cd843bbdea3b6507f49ffb57e0c09888c463 (patch)
treec5f005715b2e7340732cfc1d6f2b21126595bced /examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml
parentee60791655c3303e50cef4fc0ebd1ad644467fc8 (diff)
parente6ea89f3b7b2f42e09cfd3771f30ded536c54a73 (diff)
downloadQt-1f27cd843bbdea3b6507f49ffb57e0c09888c463.zip
Qt-1f27cd843bbdea3b6507f49ffb57e0c09888c463.tar.gz
Qt-1f27cd843bbdea3b6507f49ffb57e0c09888c463.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-qml: (53 commits) ListView.onRemove animation is not played when the list has only one item. Move listview/itemlist.qml to a separate visualitemmodel example Make snapping work properly for highlight ranges > item size Fix test - sizeHint should not change after initial load. Also use Minor doc fixes Doc improvements, including snippet fixes, linking to examples, making Fix qmlviewer test failure on windows Do not keep flush timer running once no pixmaps are detached. Avoid recursive refill() in List/GridView Make snippet compile and pass license test, and add missing snippet file Remove accidentaly added characters. Update on color change. Update on color change. Add go button to webbrowser example. Remove 'XXX Experimental' from VisualItemModel/VisualDataModel and Document attached properties Add 'on' prefix to documentation of signals Stablize qmlviewer test Improve test stability. qmlviewer: ensure that only clicks on the current file list are handled. ...
Diffstat (limited to 'examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml')
-rw-r--r--examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml12
1 files changed, 10 insertions, 2 deletions
diff --git a/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml b/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml
index d235d35..c216c08 100644
--- a/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml
+++ b/examples/declarative/tutorials/samegame/samegame4/content/Dialog.qml
@@ -58,10 +58,12 @@ Rectangle {
function showWithInput(text) {
show(text);
textInput.opacity = 1;
+ textInput.focus = true;
textInput.text = ""
}
function hide() {
+ textInput.focus = false;
container.opacity = 0;
container.closed();
}
@@ -70,6 +72,7 @@ Rectangle {
width: dialogText.width + textInput.width + 20
height: dialogText.height + 20
opacity: 0
+ visible: opacity > 0
Text {
id: dialogText
@@ -82,7 +85,6 @@ Rectangle {
id: textInput
anchors { verticalCenter: parent.verticalCenter; left: dialogText.right }
width: 80
- focus: true
text: ""
onAccepted: container.hide() // close dialog when Enter is pressed
@@ -91,7 +93,13 @@ Rectangle {
MouseArea {
anchors.fill: parent
- onClicked: hide();
+
+ onClicked: {
+ if (textInput.text == "" && textInput.opacity > 0)
+ textInput.openSoftwareInputPanel();
+ else
+ hide();
+ }
}
//![3]