diff options
Diffstat (limited to 'src/quickcontrols/doc/snippets/qtquickcontrols-swipeview-indicator.qml')
-rw-r--r-- | src/quickcontrols/doc/snippets/qtquickcontrols-swipeview-indicator.qml | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/quickcontrols/doc/snippets/qtquickcontrols-swipeview-indicator.qml b/src/quickcontrols/doc/snippets/qtquickcontrols-swipeview-indicator.qml new file mode 100644 index 0000000000..62cd48ff14 --- /dev/null +++ b/src/quickcontrols/doc/snippets/qtquickcontrols-swipeview-indicator.qml @@ -0,0 +1,39 @@ +// Copyright (C) 2017 The Qt Company Ltd. +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause + +import QtQuick +import QtQuick.Controls + +Item { + width: 200 + height: 320 + + //! [1] + SwipeView { + id: view + + currentIndex: 1 + anchors.fill: parent + + Item { + id: firstPage + } + Item { + id: secondPage + } + Item { + id: thirdPage + } + } + + PageIndicator { + id: indicator + + count: view.count + currentIndex: view.currentIndex + + anchors.bottom: view.bottom + anchors.horizontalCenter: parent.horizontalCenter + } + //! [1] +} |