aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates/qquickstackview.cpp
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2023-10-02 12:15:59 +0800
committerMitch Curtis <mitch.curtis@qt.io>2023-10-03 10:26:06 +0800
commit6d0e545d7562e4c443bf50eaa8cc0030bee4a2a7 (patch)
treed81c716ecbde6e958443c0ff4d44512651a2d7c5 /src/quicktemplates/qquickstackview.cpp
parent6f2722177be3ab74f04d0a88e8d0d72b8ee8920f (diff)
Doc: clarify default push and replace operation
It needs to mention that Immediate is used for these operations if the stack is empty. Task-number: QTBUG-117700 Pick-to: 6.2 6.5 6.6 Change-Id: I4598e8662e6e9cf5fb62ce623d08075be992ceb3 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/quicktemplates/qquickstackview.cpp')
-rw-r--r--src/quicktemplates/qquickstackview.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/quicktemplates/qquickstackview.cpp b/src/quicktemplates/qquickstackview.cpp
index 3bd2f6cfbb..a09d0ef4f1 100644
--- a/src/quicktemplates/qquickstackview.cpp
+++ b/src/quicktemplates/qquickstackview.cpp
@@ -554,7 +554,8 @@ QQuickItem *QQuickStackView::find(const QJSValue &callback, LoadBehavior behavio
\value StackView.ReplaceTransition An operation with replace transitions (since QtQuick.Controls 2.1).
\value StackView.PopTransition An operation with pop transitions (since QtQuick.Controls 2.1).
- If no operation is provided, \c PushTransition will be used.
+ If no operation is provided, \c Immediate will be used if the stack is
+ empty, and \c PushTransition otherwise.
\note Items that already exist in the stack are not pushed.
@@ -813,7 +814,8 @@ void QQuickStackView::pop(QQmlV4Function *args)
\value StackView.ReplaceTransition An operation with replace transitions (since QtQuick.Controls 2.1).
\value StackView.PopTransition An operation with pop transitions (since QtQuick.Controls 2.1).
- If no operation is provided, \c ReplaceTransition will be used.
+ If no operation is provided, \c Immediate will be used if the stack is
+ empty, and \c ReplaceTransition otherwise.
The following example illustrates the use of push and pop transitions with replace().