diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2016-07-13 15:59:49 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2016-07-13 18:59:12 +0000 |
commit | b38395d12d6efc288fb260b10f3f1d2dc039c3b7 (patch) | |
tree | 09ede095b597ca49d98e714d62750a65000eed47 | |
parent | f06db0f1c6538305d226311044cca367fc031195 (diff) |
Doc: special notes for Component and url in StackView::push/replace()
Adapted from Component::createObject() docs.
Change-Id: I53e44cfbcb4e4f1cc407e09d4ee90724526c9411
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
-rw-r--r-- | src/quicktemplates2/qquickstackview.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickstackview.cpp b/src/quicktemplates2/qquickstackview.cpp index 632879f5..8cb06d06 100644 --- a/src/quicktemplates2/qquickstackview.cpp +++ b/src/quicktemplates2/qquickstackview.cpp @@ -399,6 +399,14 @@ QQuickItem *QQuickStackView::find(const QJSValue &callback, LoadBehavior behavio an \l Item, \l Component, or a \l [QML] url. Returns the item that became current. + StackView creates an instance automatically if the pushed item is a \l Component, + or a \l [QML] url. The optional \a properties argument specifies a map of initial + property values for the pushed item. For dynamically created items, these values + are applied before the creation is finalized. This is more efficient than setting + property values after creation, particularly where large sets of property values + are defined, and also allows property bindings to be set up (using \l{Qt::binding} + {Qt.binding()}) before the item is created. + Pushing a single item: \code stackView.push(rect) @@ -575,6 +583,14 @@ void QQuickStackView::pop(QQmlV4Function *args) item will be replaced. If \a target is \c null, all items in the stack will be replaced. If not specified, only the top item will be replaced. + StackView creates an instance automatically if the replacing item is a \l Component, + or a \l [QML] url. The optional \a properties argument specifies a map of initial + property values for the replacing item. For dynamically created items, these values + are applied before the creation is finalized. This is more efficient than setting + property values after creation, particularly where large sets of property values + are defined, and also allows property bindings to be set up (using \l{Qt::binding} + {Qt.binding()}) before the item is created. + Replace the top item: \code stackView.replace(rect) |