Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativebehaviors / data / color.qml
1 import QtQuick 1.0
2 Rectangle {
3     width: 400
4     height: 400
5     Rectangle {
6         id: rect
7         objectName: "MyRect"
8         width: 100; height: 100;
9         color: "green"
10         Behavior on color { ColorAnimation { duration: 500; } }
11     }
12     MouseArea {
13         id: clicker
14         anchors.fill: parent
15     }
16     states: State {
17         name: "red"
18         when: clicker.pressed
19         PropertyChanges {
20             target: rect
21             color: "red"
22         }
23     }
24 }