summaryrefslogtreecommitdiffstats
path: root/demos/declarative/samegame/content/Dialog.qml
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-09-02 05:16:25 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-09-02 05:16:25 (GMT)
commit373e090de85ee8c46cbd400d4b5fbf37d4b59eae (patch)
tree5eed8645e3c0b6e08230885cb3da184e44dad067 /demos/declarative/samegame/content/Dialog.qml
parentd76c52133160f4394df2d6dc4d239c54833c1ab3 (diff)
parentb6e26ee808ae3ffe1c4fba03cc89baf47d65d3a8 (diff)
downloadQt-373e090de85ee8c46cbd400d4b5fbf37d4b59eae.zip
Qt-373e090de85ee8c46cbd400d4b5fbf37d4b59eae.tar.gz
Qt-373e090de85ee8c46cbd400d4b5fbf37d4b59eae.tar.bz2
Merge branch 'kinetic-declarativeui' of git@scm.dev.nokia.troll.no:qt/kinetic into kinetic-declarativeui
Diffstat (limited to 'demos/declarative/samegame/content/Dialog.qml')
-rw-r--r--demos/declarative/samegame/content/Dialog.qml18
1 files changed, 12 insertions, 6 deletions
diff --git a/demos/declarative/samegame/content/Dialog.qml b/demos/declarative/samegame/content/Dialog.qml
index 72c7900..401d211 100644
--- a/demos/declarative/samegame/content/Dialog.qml
+++ b/demos/declarative/samegame/content/Dialog.qml
@@ -2,14 +2,20 @@ 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: 60;
- property string text: "Hello World!"
opacity: 0
opacity: Behavior {
- SequentialAnimation {
- NumberAnimation {property: "opacity"; from: 0; duration: 1500 }
- NumberAnimation {property: "opacity"; to: 0; duration: 1500 }
- }
+ NumberAnimation { duration: 1000 }
}
- Text { id: MyText; anchors.centerIn: parent; text: parent.text }
+ Text { id: MyText; anchors.centerIn: parent; text: "Hello World!" }
+ MouseRegion { id: mr; anchors.fill: parent; onClicked: forceClose(); }
}