aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickstates/data/jsValueWhen.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquickstates/data/jsValueWhen.qml')
-rw-r--r--tests/auto/quick/qquickstates/data/jsValueWhen.qml18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/auto/quick/qquickstates/data/jsValueWhen.qml b/tests/auto/quick/qquickstates/data/jsValueWhen.qml
new file mode 100644
index 0000000000..6d5eb1600c
--- /dev/null
+++ b/tests/auto/quick/qquickstates/data/jsValueWhen.qml
@@ -0,0 +1,18 @@
+import QtQuick 2.15
+
+Item {
+ id: root
+ property var prop: null
+ property bool works: false
+ states: [
+ State {
+ name: "mystate"
+ when: root.prop
+ PropertyChanges {
+ target: root
+ works: "works"
+ }
+ }
+ ]
+ Component.onCompleted: root.prop = new Object
+}