summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMartin Jones <martin.jones@nokia.com>2010-11-12 05:54:50 (GMT)
committerMartin Jones <martin.jones@nokia.com>2010-11-12 05:54:50 (GMT)
commit4a01dc326faa0bc7d61f67e8848e194c3c3b99c5 (patch)
tree76d7da068eb2ad416ed0626b27b590007c5b8765 /src
parentec288ed3720ab3fdc41f3c3698fe58fb322ad090 (diff)
downloadQt-4a01dc326faa0bc7d61f67e8848e194c3c3b99c5.zip
Qt-4a01dc326faa0bc7d61f67e8848e194c3c3b99c5.tar.gz
Qt-4a01dc326faa0bc7d61f67e8848e194c3c3b99c5.tar.bz2
Fix PathView key navigation docs.
Task-number: QTBUG-15222 Reviewed-by: Yann Bodson
Diffstat (limited to 'src')
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp
index ea929cf..926bec2 100644
--- a/src/declarative/graphicsitems/qdeclarativepathview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp
@@ -373,7 +373,21 @@ void QDeclarativePathViewPrivate::regenerate()
opacity of the items as they rotate. This additional code can be seen in the
PathAttribute documentation.)
- The \c focus can be set to \c true to enable keyboard navigation.
+ PathView does not automatically handle keyboard navigation. This is because
+ the keys to use for navigation will depend upon the shape of the path. Navigation
+ can be added quite simply by setting \c focus to \c true and calling
+ \l decrementCurrentIndex() or \l incrementCurrentIndex(), for example to navigate
+ using the left and right arrow keys:
+
+ \code
+ PathView {
+ ...
+ focus: true
+ Keys.onLeftPressed: decrementCurrentIndex()
+ Keys.onRightPressed: incrementCurrentIndex()
+ }
+ \endcode
+
The path view itself is a focus scope (see \l{qmlfocus#Acquiring Focus and Focus Scopes}{the focus documentation page} for more details).
Delegates are instantiated as needed and may be destroyed at any time.