diff options
author | Bea Lam <bea.lam@nokia.com> | 2010-06-08 00:50:07 (GMT) |
---|---|---|
committer | Bea Lam <bea.lam@nokia.com> | 2010-06-09 23:36:31 (GMT) |
commit | ce8a3100868e2c545d0af3332e9b801c1fd0bc3f (patch) | |
tree | 3b463fa3262410ad0e3fb9a20d9f1af947502990 /src/declarative/qml | |
parent | c85bf4b51331496fcfb8befb4cdcc56d2fa0a213 (diff) | |
download | Qt-ce8a3100868e2c545d0af3332e9b801c1fd0bc3f.zip Qt-ce8a3100868e2c545d0af3332e9b801c1fd0bc3f.tar.gz Qt-ce8a3100868e2c545d0af3332e9b801c1fd0bc3f.tar.bz2 |
Move some example code into snippets/ and add other doc fixes
Diffstat (limited to 'src/declarative/qml')
-rw-r--r-- | src/declarative/qml/qdeclarativecomponent.cpp | 2 | ||||
-rw-r--r-- | src/declarative/qml/qdeclarativeengine.cpp | 11 |
2 files changed, 7 insertions, 6 deletions
diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp index 9847079..7b51239 100644 --- a/src/declarative/qml/qdeclarativecomponent.cpp +++ b/src/declarative/qml/qdeclarativecomponent.cpp @@ -78,7 +78,7 @@ class QByteArray; \since 4.7 \brief The Component element encapsulates a QML component description. - Components are reusable, encapsulated Qml element with a well-defined interface. + Components are reusable, encapsulated QML elements with well-defined interfaces. They are often defined in \l {qdeclarativedocuments.html}{Component Files}. The \e Component element allows defining components within a QML file. diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index 39b0802..0715624 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -191,7 +191,7 @@ when the property has one of the following types: \o \c vector3d - use \l{Qt::vector3d()}{Qt.vector3d()} \endlist -There are also string based constructors for these types, see \l{qdeclarativebasictypes.html}{QML Basic Types}. +There are also string based constructors for these types. See \l{qdeclarativebasictypes.html}{QML Basic Types} for more information. \section1 Date/Time Formatters @@ -1054,8 +1054,9 @@ or \c null if there was an error in creating the component. Call \l {Component::createObject()}{Component.createObject()} on the returned component to create an object instance of the component. -Here is an example. Remember that QML files that might be loaded -over the network cannot be expected to be ready immediately. +Here is an example. Notice it checks whether the component \l{Component::status}{status} is +\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 \codeline @@ -1095,12 +1096,12 @@ QScriptValue QDeclarativeEnginePrivate::createComponent(QScriptContext *ctxt, QS /*! \qmlmethod object Qt::createQmlObject(string qml, object parent, string filepath) -Returns a new object created from the given \a string of QML with the specified \a parent, +Returns a new object created from the given \a string of QML which will have the specified \a parent, or \c null if there was an error in creating the object. If \a filepath is specified, it will be used for error reporting for the created object. -Example (where \c targetItem is the id of an existing QML item): +Example (where \c parentItem is the id of an existing QML item): \snippet doc/src/snippets/declarative/createQmlObject.qml 0 |