Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativeanimations / data / attached.qml
1 import QtQuick 1.0
2
3 Rectangle {
4     width: 180; height: 200;
5
6     Component {
7         id: delegate
8         Rectangle {
9             id: wrapper
10             width: 180; height: 200
11             color: "blue"
12
13             states: State {
14                 name: "otherState"
15                 PropertyChanges { target: wrapper; color: "green" }
16             }
17
18             transitions: Transition {
19                 PropertyAction { target: wrapper; property: "ListView.delayRemove"; value: true }
20                 ScriptAction { script: console.log(wrapper.ListView.delayRemove ? "on" : "off") }
21             }
22
23             Component.onCompleted: {
24                 console.log(ListView.delayRemove ? "on" : "off");
25                 wrapper.state = "otherState"
26             }
27         }
28     }
29
30     ListView {
31         model: 1
32         delegate: delegate
33     }
34 }