Move no-Gui related QML types from QtQuick into QtQml
[profile/ivi/qtdeclarative.git] / tests / auto / qml / qqmlbinding / data / restoreBindingWithoutCrash.qml
1 import QtQuick 2.0
2
3 Rectangle {
4     width: 400
5     height: 400
6
7     states: State {
8         name: "state1"
9         PropertyChanges {
10             target: myItem
11             x: 200 - myItem.y
12         }
13     }
14
15     Rectangle {
16         id: myItem
17         objectName:  "myItem"
18         width: 100
19         height: 100
20         color: "green"
21         x: 100 - myItem.y
22
23         Binding on x {
24             when: myItem.y > 50
25             value: myItem.y
26         }
27     }
28 }