diff options
author | Martin Smith <martin.smith@digia.com> | 2013-10-01 13:03:28 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-02 14:40:01 +0200 |
commit | 4706b1ceff9af9141044ed3cf020ce5624bfa40f (patch) | |
tree | 43672217a945512ddd1704468d1fd4b6e9c153c7 /src/qml/doc/src/javascript/dynamicobjectcreation.qdoc | |
parent | 4f50ab594aa2fb1d38981127beca634ad3396489 (diff) |
qdoc: no longer recognizes the version nr in QML refs
All QML references of the form
<QML-module-name><QML-module-version>::<QML-type>::<member-name> have
had the <QML-module-version> removed i.
Task-number: QTBUG-33776
Change-Id: Idde279e0f254cd24ea44f9841662dd81a2c5bbc6
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Diffstat (limited to 'src/qml/doc/src/javascript/dynamicobjectcreation.qdoc')
-rw-r--r-- | src/qml/doc/src/javascript/dynamicobjectcreation.qdoc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/qml/doc/src/javascript/dynamicobjectcreation.qdoc b/src/qml/doc/src/javascript/dynamicobjectcreation.qdoc index e54404d2fd..1372858ca5 100644 --- a/src/qml/doc/src/javascript/dynamicobjectcreation.qdoc +++ b/src/qml/doc/src/javascript/dynamicobjectcreation.qdoc @@ -42,8 +42,8 @@ demonstration of the concepts discussed on this page. \section1 Creating Objects Dynamically There are two ways to create objects dynamically from JavaScript. You can -either call \l {QtQml2::Qt::createComponent()}{Qt.createComponent()} to -dynamically create a \l Component object, or use \l{QtQml2::Qt::createQmlObject()} +either call \l {QtQml::Qt::createComponent()}{Qt.createComponent()} to +dynamically create a \l Component object, or use \l{QtQml::Qt::createQmlObject()} {Qt.createQmlObject()} to create an object from a string of QML. Creating a component is better if you have an existing component defined in a QML document and you want to dynamically create instances of that component. Otherwise, @@ -54,7 +54,7 @@ generated at runtime. \section2 Creating a Component Dynamically To dynamically load a component defined in a QML file, call the -\l {QtQml2::Qt::createComponent()}{Qt.createComponent()} function in the +\l {QtQml::Qt::createComponent()}{Qt.createComponent()} function in the \l {QmlGlobalQtObject}{Qt object}. This function takes the URL of the QML file as its only argument and creates a \l Component object from this URL. @@ -113,7 +113,7 @@ created object is a visual (Qt Quick) object. The created object will become a child of the \c appWindow object in \c main.qml, and appear in the scene. When using files with relative paths, the path should -be relative to the file where \l {QtQml2::Qt::createComponent()} +be relative to the file where \l {QtQml::Qt::createComponent()} {Qt.createComponent()} is executed. To connect signals to (or receive signals from) dynamically created objects, @@ -127,7 +127,7 @@ It is also possible to instantiate components without blocking via the \section2 Creating an Object from a String of QML If the QML is not defined until runtime, you can create a QML object from -a string of QML using the \l{QtQml2::Qt::createQmlObject()}{Qt.createQmlObject()} +a string of QML using the \l{QtQml::Qt::createQmlObject()}{Qt.createQmlObject()} function, as in the following example: \snippet qml/createQmlObject.qml 0 @@ -153,9 +153,9 @@ first, the bindings in the dynamic object will no longer work. The actual creation context depends on how an object is created: \list -\li If \l {QtQml2::Qt::createComponent()}{Qt.createComponent()} is used, the +\li If \l {QtQml::Qt::createComponent()}{Qt.createComponent()} is used, the creation context is the QQmlContext in which this method is called -\li If \l{QtQml2::Qt::createQmlObject()}{Qt.createQmlObject()} is called, the +\li If \l{QtQml::Qt::createQmlObject()}{Qt.createQmlObject()} is called, the creation context is the context of the parent object passed to this method \li If a \c {Component{}} object is defined and \l {Component::createObject()} {createObject()} or \l {Component::incubateObject()}{incubateObject()} is @@ -221,7 +221,7 @@ Item { This would result in an error, since objects can only be dynamically destroyed if they were dynamically created. -Objects created with \l{QtQml2::Qt::createQmlObject()}{Qt.createQmlObject()} +Objects created with \l{QtQml::Qt::createQmlObject()}{Qt.createQmlObject()} can similarly be destroyed using \c destroy(): \snippet qml/createQmlObject.qml 0 |