aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qquickbinding/data/restoreBindingWithLoop.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qquickbinding/data/restoreBindingWithLoop.qml')
-rw-r--r--tests/auto/qml/qquickbinding/data/restoreBindingWithLoop.qml23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/qml/qquickbinding/data/restoreBindingWithLoop.qml b/tests/auto/qml/qquickbinding/data/restoreBindingWithLoop.qml
new file mode 100644
index 0000000000..ee07104817
--- /dev/null
+++ b/tests/auto/qml/qquickbinding/data/restoreBindingWithLoop.qml
@@ -0,0 +1,23 @@
+import QtQuick 2.0
+
+Rectangle {
+ width: 400
+ height: 400
+
+ property bool activateBinding: false
+
+ Rectangle {
+ id: myItem
+ objectName: "myItem"
+ width: 100
+ height: 100
+ color: "green"
+ x: myItem.y + 100
+ onXChanged: { if (x == 188) y = 90; } //create binding loop
+
+ Binding on x {
+ when: activateBinding
+ value: myItem.y
+ }
+ }
+}