aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickstackview.cpp
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-07-15 16:21:46 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-07-15 16:23:25 +0200
commitb55c1dd1e16f39a0e8b78571acc3f117c1f18d88 (patch)
tree03793fa0ccf9b08f0ecba768589b598a85562113 /src/quicktemplates2/qquickstackview.cpp
parentd9726cbd58fe9329dd450586ae51117f8ac054eb (diff)
parente9becf6931e9ff12b8912ddb79e4b2cbdd2d530a (diff)
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts: src/quicktemplates2/qquickswipedelegate.cpp tests/auto/controls/data/tst_swipedelegate.qml tests/auto/controls/data/tst_textarea.qml tests/auto/controls/data/tst_textfield.qml Change-Id: I244f4ead4d14238c41db0bd965d7a2938f2ea8fc
Diffstat (limited to 'src/quicktemplates2/qquickstackview.cpp')
-rw-r--r--src/quicktemplates2/qquickstackview.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickstackview.cpp b/src/quicktemplates2/qquickstackview.cpp
index 6fd681c5..2aff2c38 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)
@@ -587,6 +595,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)