summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qmlstates/data/legalTempState.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qmlstates/data/legalTempState.qml')
-rw-r--r--tests/auto/declarative/qmlstates/data/legalTempState.qml23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/declarative/qmlstates/data/legalTempState.qml b/tests/auto/declarative/qmlstates/data/legalTempState.qml
new file mode 100644
index 0000000..54c97b9
--- /dev/null
+++ b/tests/auto/declarative/qmlstates/data/legalTempState.qml
@@ -0,0 +1,23 @@
+import Qt 4.6
+
+Rectangle {
+ id: card
+ width: 100; height: 100
+
+ states: [
+ State {
+ name: "placed"
+ onCompleted: card.state = "idle"
+ StateChangeScript { script: console.log("entering placed") }
+ },
+ State {
+ name: "idle"
+ StateChangeScript { script: console.log("entering idle") }
+ }
+ ]
+
+ MouseRegion {
+ anchors.fill: parent
+ onClicked: card.state = "placed"
+ }
+}