aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/doc/snippets/qtquickcontrols-pageindicator-interactive.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/quickcontrols/doc/snippets/qtquickcontrols-pageindicator-interactive.qml')
-rw-r--r--src/quickcontrols/doc/snippets/qtquickcontrols-pageindicator-interactive.qml34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-pageindicator-interactive.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-pageindicator-interactive.qml
new file mode 100644
index 0000000000..d940f395ef
--- /dev/null
+++ b/src/quickcontrols/doc/snippets/qtquickcontrols-pageindicator-interactive.qml
@@ -0,0 +1,34 @@
+// Copyright (C) 2017 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+
+import QtQuick.Controls
+
+Pane {
+//! [1]
+SwipeView {
+ id: view
+ currentIndex: pageIndicator.currentIndex
+ anchors.fill: parent
+
+ Page {
+ title: qsTr("Home")
+ }
+ Page {
+ title: qsTr("Discover")
+ }
+ Page {
+ title: qsTr("Activity")
+ }
+}
+
+PageIndicator {
+ id: pageIndicator
+ interactive: true
+ count: view.count
+ currentIndex: view.currentIndex
+
+ anchors.bottom: parent.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+}
+//! [1]
+}