summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativebehaviors/data/delayedRegistration.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/declarative/qdeclarativebehaviors/data/delayedRegistration.qml')
-rw-r--r--tests/auto/declarative/qdeclarativebehaviors/data/delayedRegistration.qml25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativebehaviors/data/delayedRegistration.qml b/tests/auto/declarative/qdeclarativebehaviors/data/delayedRegistration.qml
new file mode 100644
index 0000000..aa384c3
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativebehaviors/data/delayedRegistration.qml
@@ -0,0 +1,25 @@
+import QtQuick 1.0
+
+Rectangle {
+ id: container
+
+ width: 400; height: 400;
+ property Item myItem
+
+ function doCreate() {
+ myItem = myComponent.createObject(container)
+ myItem.x = 100
+ }
+
+ Component {
+ id: myComponent
+ Rectangle {
+ width: 100
+ height: 100
+ color: "green"
+ Behavior on x { NumberAnimation { duration: 500 } }
+ }
+ }
+
+ Component.onCompleted: doCreate()
+}