diff options
Diffstat (limited to 'tests/auto/quick/qquickstates/data/noStateOsciallation.qml')
-rw-r--r-- | tests/auto/quick/qquickstates/data/noStateOsciallation.qml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickstates/data/noStateOsciallation.qml b/tests/auto/quick/qquickstates/data/noStateOsciallation.qml new file mode 100644 index 0000000000..f0d7aeeb6d --- /dev/null +++ b/tests/auto/quick/qquickstates/data/noStateOsciallation.qml @@ -0,0 +1,22 @@ +import QtQuick 2.15 + +Item { + id: root + property int number: 2 + property int stateChangeCounter: 0 + + Item { + id: item + onStateChanged: ++stateChangeCounter + states: [ + State { + name: "n1" + when: root.number === 1 + }, + State { + name: "n2" + when: root.number === 2 + } + ] + } +} |