aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickstates/data/noStateOsciallation.qml
diff options
context:
space:
mode:
authorTarja Sundqvist <tarja.sundqvist@qt.io>2023-03-23 16:00:07 +0200
committerTarja Sundqvist <tarja.sundqvist@qt.io>2023-03-23 16:00:07 +0200
commit19ed7973a311a8d42d3a558bb551230e902ce9b9 (patch)
tree9832c0cc796722f85579e25fd50cc38b65e6ef6c /tests/auto/quick/qquickstates/data/noStateOsciallation.qml
parentf5701f0def37fcc0c2b38ae9552eb3a896a34687 (diff)
parenta5635345175e667601c8b6a344508c4d4ebb0f9d (diff)
Merge remote-tracking branch 'origin/tqtc/lts-5.15.9' into tqtc/lts-5.15-opensourcev5.15.9-lts-lgpl
Diffstat (limited to 'tests/auto/quick/qquickstates/data/noStateOsciallation.qml')
-rw-r--r--tests/auto/quick/qquickstates/data/noStateOsciallation.qml22
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
+ }
+ ]
+ }
+}