diff options
Diffstat (limited to 'src/quicktemplates2/qquickpageindicator.cpp')
-rw-r--r-- | src/quicktemplates2/qquickpageindicator.cpp | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/src/quicktemplates2/qquickpageindicator.cpp b/src/quicktemplates2/qquickpageindicator.cpp index 04c6a344..0c1ed616 100644 --- a/src/quicktemplates2/qquickpageindicator.cpp +++ b/src/quicktemplates2/qquickpageindicator.cpp @@ -58,7 +58,28 @@ QT_BEGIN_NAMESPACE \image qtquickcontrols2-pageindicator.png - \snippet qtquickcontrols2-pageindicator.qml 1 + \code + Column { + StackLayout { + id: stackLayout + + Page { + // ... + } + Page { + // ... + } + Page { + // ... + } + } + + PageIndicator { + currentIndex: stackLayout.currentIndex + count: stackLayout.count + } + } + \endcode \sa SwipeView, {Customizing PageIndicator}, {Indicator Controls} */ @@ -199,6 +220,14 @@ void QQuickPageIndicator::setCurrentIndex(int index) reacts to presses and automatically changes the \l {currentIndex}{current index} appropriately. + \snippet qtquickcontrols2-pageindicator-interactive.qml 1 + + \note Page indicators are typically quite small (in order to avoid + distracting the user from the actual content of the user interface). They + can be hard to click, and might not be easily recognized as interactive by + the user. For these reasons, they are best used to complement primary + methods of navigation (such as \l SwipeView), not replace them. + The default value is \c false. */ bool QQuickPageIndicator::isInteractive() const |