[Qt-qml] smooth scrolling using positionViewatIndex

bea.lam at nokia.com bea.lam at nokia.com
Thu Oct 6 03:05:33 CEST 2011


On 05/10/2011, at 7:30 PM, ext Bartosh Wroblevksy wrote:

>Unlike in a GridView, the sizes of items and section headers may change at any time.

Not sure I understand because I am looking to animate the positionViewatIndex on precisely a GridView.  You have this on the home screen of Android and Iphone when you flick from one page to the next. There must be a way to do this in QML.

Great, with a GridView it's a lot easier, because all items have the same width and height, as determined by cellWidth and cellHeight, so you can calculate the appropriate contentY yourself and just animate using that.

With a ListView, you can do the same if you know that item sizes will never change and if there are no section headers.


Outside of looking for a particular index, I have had trouble in the past to simply modify the ContentY property of a ListView. The ListView would simply do nothing when the that property would change.

Changing the contentY of a ListView should trigger any animations that have been set for the property, so I'm not sure what the issue was there.


regards,

Bea

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20111006/24912a74/attachment.html 


More information about the Qt-qml mailing list