diff options
Diffstat (limited to 'tests/auto/declarative/qdeclarativestates/data/legalTempState.qml')
-rw-r--r-- | tests/auto/declarative/qdeclarativestates/data/legalTempState.qml | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativestates/data/legalTempState.qml b/tests/auto/declarative/qdeclarativestates/data/legalTempState.qml new file mode 100644 index 0000000..9be984c --- /dev/null +++ b/tests/auto/declarative/qdeclarativestates/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") } + } + ] + + MouseArea { + anchors.fill: parent + onClicked: card.state = "placed" + } +} |