diff options
author | David Boddie <david.boddie@nokia.com> | 2011-03-27 23:07:04 (GMT) |
---|---|---|
committer | David Boddie <david.boddie@nokia.com> | 2011-03-27 23:07:04 (GMT) |
commit | 8faad8f5e7ddf03b4bf19ef51ddd1ad3c3b5f968 (patch) | |
tree | 232e346dba7226f35af80043e072538dba473201 /doc/src | |
parent | acc903853d5ac54d646d324b7386c998bc07d464 (diff) | |
parent | ea9f34568acd1286f5ed4e7f2bf760982a4e4579 (diff) | |
download | Qt-8faad8f5e7ddf03b4bf19ef51ddd1ad3c3b5f968.zip Qt-8faad8f5e7ddf03b4bf19ef51ddd1ad3c3b5f968.tar.gz Qt-8faad8f5e7ddf03b4bf19ef51ddd1ad3c3b5f968.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-doc-review into 4.7
Conflicts:
doc/src/declarative/dynamicobjects.qdoc
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/declarative/dynamicobjects.qdoc | 14 | ||||
-rw-r--r-- | doc/src/declarative/qmlwebkit.qdoc | 5 | ||||
-rw-r--r-- | doc/src/snippets/declarative/webview/webview.qml | 2 |
3 files changed, 11 insertions, 10 deletions
diff --git a/doc/src/declarative/dynamicobjects.qdoc b/doc/src/declarative/dynamicobjects.qdoc index 7c10760..90fb715 100644 --- a/doc/src/declarative/dynamicobjects.qdoc +++ b/doc/src/declarative/dynamicobjects.qdoc @@ -69,12 +69,14 @@ a \l Component object from this URL. Once you have a \l Component, you can call its \l {Component::createObject()}{createObject()} method to create an instance of the component. This function can take one or two arguments: \list -\o The first is the parent for the new item. Since graphical items will not appear on the scene without a parent, it is - recommended that you set the parent this way. However, if you wish to set the parent later you can safely pass \c null to - this function. -\o The second is optional and is a script which assigns values to the item's properties during creation. This avoids warnings - when certain properties have been bound to before they have been set by the code. Additionally, there are small performance - benefits when instantiating objects in this way. +\o The first is the parent for the new item. Since graphical items will not appear on the scene without a parent, it is + recommended that you set the parent this way. However, if you wish to set the parent later you can safely pass \c null to + this function. +\o The second is optional and is a map of property-value items that define initial any property values for the item. + Property values specified by this argument are applied to the object before its creation is finalized, avoiding + binding errors that may occur if particular properties must be initialized to enable other property bindings. + when certain properties have been bound to before they have been set by the code. Additionally, there are small + performance benefits when compared to defining property values and bindings after the object is created. \endlist Here is an example. First there is \c Sprite.qml, which defines a simple QML component: diff --git a/doc/src/declarative/qmlwebkit.qdoc b/doc/src/declarative/qmlwebkit.qdoc index 354e60a..840f24d 100644 --- a/doc/src/declarative/qmlwebkit.qdoc +++ b/doc/src/declarative/qmlwebkit.qdoc @@ -42,14 +42,11 @@ The QtWebKit Module has a QML element, \l{WebView} for displaying web content from a \c URL. Import the QtWebKit module before declaring a \c WebView element: -\qml -import QtWebKit 1.0 -\endqml +\snippet doc/src/snippets/declarative/webview/webview.qml import \section1 Simple Usage \snippet doc/src/snippets/declarative/webview/webview.qml document \image webview.png \sa {Models and Views: WebView Example}{WebView Example}, {QML Web Browser} - */ diff --git a/doc/src/snippets/declarative/webview/webview.qml b/doc/src/snippets/declarative/webview/webview.qml index c1cef33..a986fab 100644 --- a/doc/src/snippets/declarative/webview/webview.qml +++ b/doc/src/snippets/declarative/webview/webview.qml @@ -39,7 +39,9 @@ ****************************************************************************/ //! [document] +//! [import] import QtWebKit 1.0 +//! [import] WebView { url: "http://www.nokia.com" |