summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qdeclarativeengine.cpp
diff options
context:
space:
mode:
authorBea Lam <bea.lam@nokia.com>2010-07-20 01:44:05 (GMT)
committerBea Lam <bea.lam@nokia.com>2010-07-20 01:45:49 (GMT)
commit5b39b47255d04675f15b242252565ec0b7e8e78e (patch)
tree9128eb0d9379a7ffaa892ec044de8ce457a240b1 /src/declarative/qml/qdeclarativeengine.cpp
parentc95889b7896dc5418841ef72326d99296943e616 (diff)
downloadQt-5b39b47255d04675f15b242252565ec0b7e8e78e.zip
Qt-5b39b47255d04675f15b242252565ec0b7e8e78e.tar.gz
Qt-5b39b47255d04675f15b242252565ec0b7e8e78e.tar.bz2
various doc improvements for animation elements
Diffstat (limited to 'src/declarative/qml/qdeclarativeengine.cpp')
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index f2eb770..d1ba6ce 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -1080,13 +1080,20 @@ Here is an example. Notice it checks whether the component \l{Component::status}
\c Component.Ready before calling \l {Component::createObject()}{createObject()}
in case the QML file is loaded over a network and thus is not ready immediately.
-\snippet doc/src/snippets/declarative/componentCreation.js 0
+\snippet doc/src/snippets/declarative/componentCreation.js vars
\codeline
-\snippet doc/src/snippets/declarative/componentCreation.js 1
+\snippet doc/src/snippets/declarative/componentCreation.js func
+\snippet doc/src/snippets/declarative/componentCreation.js remote
+\snippet doc/src/snippets/declarative/componentCreation.js func-end
+\codeline
+\snippet doc/src/snippets/declarative/componentCreation.js finishCreation
-If you are certain the files will be local, you could simplify to:
+If you are certain the QML file to be loaded is a local file, you could omit the \c finishCreation()
+function and call \l {Component::createObject()}{createObject()} immediately:
-\snippet doc/src/snippets/declarative/componentCreation.js 2
+\snippet doc/src/snippets/declarative/componentCreation.js func
+\snippet doc/src/snippets/declarative/componentCreation.js local
+\snippet doc/src/snippets/declarative/componentCreation.js func-end
To create a QML object from an arbitrary string of QML (instead of a file),
use \l{QML:Qt::createQmlObject()}{Qt.createQmlObject()}.