diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2010-05-24 10:02:57 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2010-05-24 10:46:57 (GMT) |
commit | 1079096a57112d9615812771adba18d2e9297320 (patch) | |
tree | 9c1fbdf2475e831fc9cce597586f37836589f60b /tests/auto/declarative/qdeclarativecomponent/data/createObject.qml | |
parent | 4c975ee19b9671fbf76b546fc8ca2eff5bc69303 (diff) | |
download | Qt-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.qml | 16 |
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); + } +} |