diff options
author | Justin McPherson <justin.mcpherson@nokia.com> | 2010-02-14 23:37:12 (GMT) |
---|---|---|
committer | Justin McPherson <justin.mcpherson@nokia.com> | 2010-02-14 23:37:12 (GMT) |
commit | 0010cbdd14ce167857ae9eb8f539ad7b1205542a (patch) | |
tree | 92d8b31cece70ad76abc867e3a34567a1e2c116c /demos/declarative/samegame/content/Dialog.qml | |
parent | 9bca64fc5eee598f97eba1052f1db250c5c7e43b (diff) | |
parent | 42dda19d82ceea48f19d356cfaf2b26acb763df8 (diff) | |
download | Qt-0010cbdd14ce167857ae9eb8f539ad7b1205542a.zip Qt-0010cbdd14ce167857ae9eb8f539ad7b1205542a.tar.gz Qt-0010cbdd14ce167857ae9eb8f539ad7b1205542a.tar.bz2 |
Merge branch 'master' of ../../qt/master
Diffstat (limited to 'demos/declarative/samegame/content/Dialog.qml')
-rw-r--r-- | demos/declarative/samegame/content/Dialog.qml | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/demos/declarative/samegame/content/Dialog.qml b/demos/declarative/samegame/content/Dialog.qml new file mode 100644 index 0000000..f9a281a --- /dev/null +++ b/demos/declarative/samegame/content/Dialog.qml @@ -0,0 +1,21 @@ +import Qt 4.6 + +Rectangle { + id: page + function forceClose() { + page.closed(); + page.opacity = 0; + } + function show(txt) { + myText.text = txt; + page.opacity = 1; + } + signal closed(); + color: "white"; border.width: 1; width: myText.width + 20; height: myText.height + 40; + opacity: 0 + opacity: Behavior { + NumberAnimation { duration: 1000 } + } + Text { id: myText; anchors.centerIn: parent; text: "Hello World!" } + MouseRegion { id: mr; anchors.fill: parent; onClicked: forceClose(); } +} |