diff options
author | Martin Jones <[email protected]> | 2012-07-26 13:14:50 +1000 |
---|---|---|
committer | Qt by Nokia <[email protected]> | 2012-07-27 03:08:24 +0200 |
commit | 3a045419ba588107d7730978c14643d68340f24b (patch) | |
tree | 2d9d84b06b4ae762dfc46a5bfbea5ee31f560e8d /src/quick/items/qquicklistview.cpp | |
parent | 4dcd5ae1e27252755a51dec139269bc4f998adb4 (diff) |
Add SnapPosition mode to positionViewAtIndex() in List/GridView.
This allows the view to be positioned on a snap boundary, which is
generally what is wanted when strict highlight mode s set or snapping
is enabled.
Task-number: QTBUG-26605
Change-Id: I6288dc8be4ff16c412b56ab449b6a9fb7b7ea889
Reviewed-by: Bea Lam <[email protected]>
Diffstat (limited to 'src/quick/items/qquicklistview.cpp')
-rw-r--r-- | src/quick/items/qquicklistview.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/quick/items/qquicklistview.cpp b/src/quick/items/qquicklistview.cpp index 18b994733e..61574ee1b1 100644 --- a/src/quick/items/qquicklistview.cpp +++ b/src/quick/items/qquicklistview.cpp @@ -3031,6 +3031,9 @@ void QQuickListViewPrivate::translateAndTransitionItemsAfter(int afterModelIndex bring the item into view. \li ListView.Contain - ensure the entire item is visible. If the item is larger than the view the item is positioned at the top (or left for horizontal orientation) of the view. + \li ListView.SnapPosition - position the item at \l preferredHighlightBegin. This mode + is only valid if \l highlightRangeMode is StrictlyEnforceRange or snapping is enabled + via \l snapMode. \endlist If positioning the view at \a index would cause empty space to be displayed at |