aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates/qquickstackview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/quicktemplates/qquickstackview.cpp')
-rw-r--r--src/quicktemplates/qquickstackview.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/quicktemplates/qquickstackview.cpp b/src/quicktemplates/qquickstackview.cpp
index 457423104e..e97fecf1f6 100644
--- a/src/quicktemplates/qquickstackview.cpp
+++ b/src/quicktemplates/qquickstackview.cpp
@@ -934,8 +934,10 @@ void QQuickStackView::replace(QQmlV4Function *args)
\since 6.7
Pushes \a items onto the stack using an optional \a operation, and
- optionally applies a set of properties on each element. Each element can be
- an \l Item, \l Component, or \l [QML] url. Returns the item that became
+ optionally applies a set of properties on each element. \a items is an array
+ of elements. Each element can be
+ an \l Item, \l Component, or \l [QML] url and can be followed by an optional
+ properties argument (see below). Returns the item that became
current (the last item).
StackView creates an instance automatically if the pushed element is a
@@ -948,14 +950,14 @@ void QQuickStackView::replace(QQmlV4Function *args)
stackView.push([item, rectComponent, Qt.resolvedUrl("MyItem.qml")])
// With properties:
- stackView.push([
+ stackView.pushItems([
item, { "color": "red" },
rectComponent, { "color": "green" },
Qt.resolvedUrl("MyItem.qml"), { "color": "blue" }
])
// With properties for only some items:
- stackView.push([
+ stackView.pushItems([
item, { "color": "yellow" },
rectComponent
])