diff options
author | Martin Jones <martin.jones@nokia.com> | 2010-03-11 05:18:33 (GMT) |
---|---|---|
committer | Martin Jones <martin.jones@nokia.com> | 2010-03-11 05:18:33 (GMT) |
commit | f42c8faec825126d335e3c5a63c2e034476865e0 (patch) | |
tree | 0b047db235380ac727bf39132affbc765d6f7db3 /examples/declarative | |
parent | 16b28550f03ec69cee8481d93c3ba2c8830e53f5 (diff) | |
download | Qt-f42c8faec825126d335e3c5a63c2e034476865e0.zip Qt-f42c8faec825126d335e3c5a63c2e034476865e0.tar.gz Qt-f42c8faec825126d335e3c5a63c2e034476865e0.tar.bz2 |
Add a positioning 'mode' to positionViewAtIndex()
Provides more control over where and how the view is positioned.
Diffstat (limited to 'examples/declarative')
-rw-r--r-- | examples/declarative/colorbrowser/colorbrowser.qml | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/declarative/colorbrowser/colorbrowser.qml b/examples/declarative/colorbrowser/colorbrowser.qml index 421ae07..d4c21e7 100644 --- a/examples/declarative/colorbrowser/colorbrowser.qml +++ b/examples/declarative/colorbrowser/colorbrowser.qml @@ -16,7 +16,7 @@ Rectangle { GridView { id: gridView; model: visualModel.parts.grid; width: mainWindow.width; height: mainWindow.height cellWidth: 160; cellHeight: 160; interactive: false - onCurrentIndexChanged: listView.positionViewAtIndex(currentIndex) + onCurrentIndexChanged: listView.positionViewAtIndex(currentIndex, ListView.Contain) } } @@ -25,7 +25,7 @@ Rectangle { ListView { id: listView; model: visualModel.parts.list; orientation: Qt.Horizontal width: mainWindow.width; height: mainWindow.height; interactive: false - onCurrentIndexChanged: gridView.positionViewAtIndex(currentIndex) + onCurrentIndexChanged: gridView.positionViewAtIndex(currentIndex, GridView.Contain) highlightRangeMode: ListView.StrictlyEnforceRange; snapMode: ListView.SnapOneItem } } |