Initial import from the monolithic Qt.
[profile/ivi/qtdeclarative.git] / tests / auto / declarative / qdeclarativebehaviors / data / delayedRegistration.qml
1 import QtQuick 1.0
2
3 Rectangle {
4     id: container
5
6     width: 400; height: 400;
7     property Item myItem
8
9     function doCreate() {
10         myItem = myComponent.createObject(container)
11         myItem.x = 100
12     }
13
14     Component {
15         id: myComponent
16         Rectangle {
17             width: 100
18             height: 100
19             color: "green"
20             Behavior on x { NumberAnimation { duration: 500 } }
21         }
22     }
23
24     Component.onCompleted: doCreate()
25 }