aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativebinding/data/restoreBindingWithLoop.qml
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2011-08-11 16:03:12 +0200
committerGunnar Sletta <gunnar.sletta@nokia.com>2011-08-11 16:03:12 +0200
commitf9949f501890a7f8289fcbda85d3a4085bdbb21a (patch)
tree759e57bb3ed156e46a98c3a4223951c3edc55d43 /tests/auto/declarative/qdeclarativebinding/data/restoreBindingWithLoop.qml
parent1ddef09c351f2899b1662ddd1de190c0d0a8b7bf (diff)
parent3e0c19d5ba0e4826c3f036c3172d8ea0e30530a6 (diff)
Merge branch 'master' into refactor
Conflicts: src/declarative/declarative.pro src/imports/gestures/gestures.pro src/imports/inputcontext/inputcontext.pro src/qtquick1/graphicsitems/qdeclarativeitem.cpp src/qtquick1/qtquick1.pro Change-Id: I782be7090d8b6da9c890bc8e778722da93da8037
Diffstat (limited to 'tests/auto/declarative/qdeclarativebinding/data/restoreBindingWithLoop.qml')
-rw-r--r--tests/auto/declarative/qdeclarativebinding/data/restoreBindingWithLoop.qml23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativebinding/data/restoreBindingWithLoop.qml b/tests/auto/declarative/qdeclarativebinding/data/restoreBindingWithLoop.qml
new file mode 100644
index 0000000000..ee07104817
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativebinding/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
+ }
+ }
+}