aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickpageindicator.cpp
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2016-09-21 15:34:21 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-09-23 05:15:39 +0000
commit6883dbd814141ec794df24096302bf51b34a91eb (patch)
treec08aa1a87a2052fc3146061acaa69645bcdd481f /src/quicktemplates2/qquickpageindicator.cpp
parentbebbd47cf6b00326cb504cf6bc95da678271a893 (diff)
PageIndicator: fix documentation review findings
Change-Id: Ie684aeeeb5c9a57d8904e2526403aba1b85ce465 Task-number: QTBUG-55904 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickpageindicator.cpp')
-rw-r--r--src/quicktemplates2/qquickpageindicator.cpp31
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