diff options
Diffstat (limited to 'tests/auto/declarative/qdeclarativebinding/data/restoreBindingWithLoop.qml')
-rw-r--r-- | tests/auto/declarative/qdeclarativebinding/data/restoreBindingWithLoop.qml | 23 |
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 + } + } +} |