summaryrefslogtreecommitdiff
path: root/src/controls/StackView.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/controls/StackView.qml')
-rw-r--r--src/controls/StackView.qml25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/controls/StackView.qml b/src/controls/StackView.qml
index 2f3d5753..bd9c4de9 100644
--- a/src/controls/StackView.qml
+++ b/src/controls/StackView.qml
@@ -51,11 +51,36 @@ import QtQuick.Controls.Private 1.0
\brief Provides a stack-based navigation model.
+ \image stackview.png
+
StackView implements a stack-based navigation model, which can be used
with a set of interlinked information pages. Items are pushed onto the stack
as the user navigates deeper into the material, and popped off again when he
chooses to go back.
+ The \l{Qt Quick Controls - Touch Gallery}{touch gallery} example is a good
+ starting point to understand how StackView works. The following snippet
+ from the example shows how it can be used:
+
+ \qml
+ StackView {
+ id: stack
+ initialItem: view
+
+ Component {
+ id: view
+
+ MouseArea {
+ Text {
+ text: stack.depth
+ anchors.centerIn: parent
+ }
+ onClicked: stack.push(view)
+ }
+ }
+ }
+ \endqml
+
\section1 Using StackView in an Application
Using the StackView in the application is typically a simple matter of adding
the StackView as a child of a Window. The stack is usually anchored to the