summaryrefslogtreecommitdiffstats
path: root/src/controls/StackView.qml
diff options
context:
space:
mode:
authorVenu <venugopal.shivashankar@digia.com>2014-03-06 16:53:40 +0100
committerVenugopal Shivashankar <venugopal.shivashankar@digia.com>2014-06-27 12:30:40 +0200
commit58c5f54f0b772a424c60a8e5184eaf698e744c9a (patch)
tree78dd541ef330ca522b34684f8530037f68a71bea /src/controls/StackView.qml
parentc76b9478be9c6aab13bcd8e237db12dec080841e (diff)
Doc: Added images and missing snippets
Task-number: QTBUG-33799 Change-Id: I582518a73276d47cf63cf31411b5176a90acab6f Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
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 2f3d57532..bd9c4de9c 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