diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-04-21 07:24:41 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-04-21 07:24:41 (GMT) |
commit | 550f7a2aadbd46c7bd6f30e1faa0bb9a1241a3cf (patch) | |
tree | 6096fb849261ad6328721a97cc06c4630d675040 /doc | |
parent | cffe02d1c7aa5f087558fcbabdab890b979ae5cc (diff) | |
parent | e39958e76340698cc2b0ac88a03167a016b9c07b (diff) | |
download | Qt-550f7a2aadbd46c7bd6f30e1faa0bb9a1241a3cf.zip Qt-550f7a2aadbd46c7bd6f30e1faa0bb9a1241a3cf.tar.gz Qt-550f7a2aadbd46c7bd6f30e1faa0bb9a1241a3cf.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'doc')
-rw-r--r-- | doc/src/declarative/globalobject.qdoc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/doc/src/declarative/globalobject.qdoc b/doc/src/declarative/globalobject.qdoc index d84754b..d729d4f 100644 --- a/doc/src/declarative/globalobject.qdoc +++ b/doc/src/declarative/globalobject.qdoc @@ -258,6 +258,11 @@ of their use. } \endcode + The methods and properties of the Component element are defined in its own + page, but when using it dynamically only two methods are usually used. + Component.createObject() returns the created object or null if there is an error. + If there is an error, Component.errorsString() describes what the error was. + If you want to just create an arbitrary string of QML, instead of loading a QML file, consider the createQmlObject() function. @@ -277,7 +282,9 @@ of their use. similarly to eval, but for creating QML elements. Returns the created object, or null if there is an error. In the case of an - error, details of the error are output using qWarning(). + error, a QtScript Error object is thrown. This object has the additional property, + qmlErrors, which is an array of all the errors encountered when trying to execute the + QML. Each object in the array has the members: lineNumber, columnNumber, fileName and message. Note that this function returns immediately, and therefore may not work if the QML loads new components. If you are trying to load a new component, |