summaryrefslogtreecommitdiffstats
path: root/tests/auto/declarative/qdeclarativecomponent/data/createObject.qml
diff options
context:
space:
mode:
authorAlan Alpert <alan.alpert@nokia.com>2010-05-24 10:02:57 (GMT)
committerAlan Alpert <alan.alpert@nokia.com>2010-05-24 10:46:57 (GMT)
commit1079096a57112d9615812771adba18d2e9297320 (patch)
tree9c1fbdf2475e831fc9cce597586f37836589f60b /tests/auto/declarative/qdeclarativecomponent/data/createObject.qml
parent4c975ee19b9671fbf76b546fc8ca2eff5bc69303 (diff)
downloadQt-1079096a57112d9615812771adba18d2e9297320.zip
Qt-1079096a57112d9615812771adba18d2e9297320.tar.gz
Qt-1079096a57112d9615812771adba18d2e9297320.tar.bz2
Added autotest for Component.createObject() without Qt.createComponent()
Also augmented the docs for both functions a little. Task-number: QTBUG-10926
Diffstat (limited to 'tests/auto/declarative/qdeclarativecomponent/data/createObject.qml')
-rw-r--r--tests/auto/declarative/qdeclarativecomponent/data/createObject.qml16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/auto/declarative/qdeclarativecomponent/data/createObject.qml b/tests/auto/declarative/qdeclarativecomponent/data/createObject.qml
new file mode 100644
index 0000000..4ee1e75
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativecomponent/data/createObject.qml
@@ -0,0 +1,16 @@
+import Qt 4.7
+
+Item{
+ id: root
+ property QtObject qobject : null
+ property QtObject declarativeitem : null
+ property QtObject graphicswidget: null
+ Component{id: a; QtObject{} }
+ Component{id: b; Item{} }
+ Component{id: c; QGraphicsWidget{} }
+ Component.onCompleted: {
+ root.qobject = a.createObject(root);
+ root.declarativeitem = b.createObject(root);
+ root.graphicswidget = c.createObject(root);
+ }
+}