diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2010-02-10 09:07:35 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2010-02-10 09:07:35 (GMT) |
commit | ae0195f08b37a7250fa4148f6fe8ec9a17421148 (patch) | |
tree | 028dcca4b166cb91e88779d02feb80b6fe89522e | |
parent | ae22dc2472f53c0926b01ef390b7fbeeae0d11ad (diff) | |
download | Qt-ae0195f08b37a7250fa4148f6fe8ec9a17421148.zip Qt-ae0195f08b37a7250fa4148f6fe8ec9a17421148.tar.gz Qt-ae0195f08b37a7250fa4148f6fe8ec9a17421148.tar.bz2 |
Attempt to clairify highlight range docs
-rw-r--r-- | src/declarative/graphicsitems/qmlgraphicslistview.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/declarative/graphicsitems/qmlgraphicslistview.cpp b/src/declarative/graphicsitems/qmlgraphicslistview.cpp index a7a37e5..15064cd 100644 --- a/src/declarative/graphicsitems/qmlgraphicslistview.cpp +++ b/src/declarative/graphicsitems/qmlgraphicslistview.cpp @@ -1748,6 +1748,7 @@ void QmlGraphicsListView::setHighlightFollowsCurrentItem(bool autoHighlight) } } +//###Possibly rename these properties, since they are very useful even without a highlight? /*! \qmlproperty real ListView::preferredHighlightBegin \qmlproperty real ListView::preferredHighlightEnd @@ -1756,6 +1757,15 @@ void QmlGraphicsListView::setHighlightFollowsCurrentItem(bool autoHighlight) These properties set the preferred range of the highlight (current item) within the view. + Note that this is the correct way to influence where the + current item ends up when the list scrolls. For example, if you want the + currently selected item to be in the middle of the list, then set the + highlight range to be where the middle item would go. Then, when the list scrolls, + the currently selected item will be the item at that spot. This also applies to + when the currently selected item changes - it will scroll to within the preferred + highlight range. Furthermore, the behaviour of the current item index will occur + whether or not a highlight exists. + If highlightRangeMode is set to \e ApplyRange the view will attempt to maintain the highlight within the range, however the highlight can move outside of the range at the ends of the list |