diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2010-04-30 07:21:31 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2010-04-30 07:21:31 (GMT) |
commit | d8683cd18c852569672e43237c06dc619f193eba (patch) | |
tree | 32dfe36ba1d99aa2817dc3bdb91f0ec01b1d4c67 /doc/src | |
parent | 85db980578cb9f1b95be160a4386d9822c6ec6d0 (diff) | |
parent | 5d34515465d143d08d198b799489f472741a340f (diff) | |
download | Qt-d8683cd18c852569672e43237c06dc619f193eba.zip Qt-d8683cd18c852569672e43237c06dc619f193eba.tar.gz Qt-d8683cd18c852569672e43237c06dc619f193eba.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-qml into 4.7
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/declarative/dynamicobjects.qdoc | 14 | ||||
-rw-r--r-- | doc/src/declarative/globalobject.qdoc | 3 |
2 files changed, 7 insertions, 10 deletions
diff --git a/doc/src/declarative/dynamicobjects.qdoc b/doc/src/declarative/dynamicobjects.qdoc index c376266..5cdd768 100644 --- a/doc/src/declarative/dynamicobjects.qdoc +++ b/doc/src/declarative/dynamicobjects.qdoc @@ -68,7 +68,7 @@ the \l {Qt.createComponent(url file)}{Qt.createComponent()} function on the \l{Q This function takes the URL of the QML file as its only argument and returns a component object which can be used to create and load that QML file. -Once you have a component you can use its \c createObject() method to create an instance of +Once you have a component you can use its \l {Component::createObject()}{createObject()} method to create an instance of the component. Here is an example. Here is a \c Sprite.qml, which defines a simple QML component: @@ -123,19 +123,13 @@ The actual creation context depends on how an item is created: is the QDeclarativeContext in which this method is called \o If \l{Qt.createQmlObject(string qml, object parent, string filepath)}{Qt.createQmlObject()} if called, it is the context of the item used as the second argument to this method -\o If a \c {Component \{\}} item is defined and \c {Component::}{createObject()} is called, - it is the context in which the \c Component item is defined +\o If a \c {Component{}} item is defined and \l {Component::createObject()}{createObject()} + is called on that item, it is the context in which the \c Component is defined +\endlist Also, note that while dynamically created objects may be used the same as other objects, they do not have an id in QML. -A restriction which you need to manage with dynamically created items, -is that the creation context must outlive the -created item. The creation context is the QDeclarativeContext in which \c Qt.createComponent() -was called, or the context in which the Component element, or the item used as the -second argument to \c Qt.createQmlObject(), was specified. If the creation -context is destroyed before the dynamic item is, then bindings in the dynamic item will -fail to work. \section1 Deleting Objects Dynamically You should generally avoid dynamically deleting objects that you did not diff --git a/doc/src/declarative/globalobject.qdoc b/doc/src/declarative/globalobject.qdoc index 47460cf..7c27ae4 100644 --- a/doc/src/declarative/globalobject.qdoc +++ b/doc/src/declarative/globalobject.qdoc @@ -226,6 +226,9 @@ This function causes the QML engine to emit the quit signal, which in This function returns \c url resolved relative to the URL of the caller. +\section3 Qt.fontFamilies() +This function returns a list of the font families available to the application. + \section3 Qt.isQtObject(object) Returns true if \c object is a valid reference to a Qt or QML object, otherwise false. |