Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativebinding / data / test-binding.qml
1 import QtQuick 1.0
2
3 Rectangle {
4     id: screen
5     width: 320; height: 240
6     property string text
7     property bool changeColor: false
8
9     Text { id: s1; text: "Hello" }
10     Rectangle { id: r1; width: 1; height: 1; color: "yellow" }
11     Rectangle { id: r2; width: 1; height: 1; color: "red" }
12
13     Binding { target: screen; property: "text"; value: s1.text; objectName: "binding1" }
14     Binding { target: screen; property: "color"; value: r1.color }
15     Binding { target: screen; property: "color"; when: screen.changeColor == true; value: r2.color; objectName: "binding3" }
16 }