diff options
Diffstat (limited to 'tests/auto/qtquick2/qdeclarativestates/data/legalTempState.qml')
-rw-r--r-- | tests/auto/qtquick2/qdeclarativestates/data/legalTempState.qml | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/qtquick2/qdeclarativestates/data/legalTempState.qml b/tests/auto/qtquick2/qdeclarativestates/data/legalTempState.qml new file mode 100644 index 0000000000..a93860f5cc --- /dev/null +++ b/tests/auto/qtquick2/qdeclarativestates/data/legalTempState.qml @@ -0,0 +1,23 @@ +import QtQuick 2.0 + +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" + } +} |