On 14/07/2010, at 10:20 AM, ext Jason H wrote:
> Ok, I'm with you. So how do I make sure all the images have loaded in the
> model?
>
Actually, it's probably better to avoid NumberAnimation. In your case it's not
the best thing to use since your "to" value keeps changing.
A better option is SmoothedAnimation, which smoothly moves towards the "to"
value even if it changes, and you can set a velocity instead of a fixed
duration. However there's a current bug that causes a jump at the end if the
delegate heights have changed.
But, if you are just scrolling to the end, then the easiest option of all is to
just set the current item index:
ListView {
id: lv
anchors.fill: parent
model: visualModel
spacing: 10
states: State {
name: "scrolling"
when: lv.contentHeight > 0 && !lv.moving
PropertyChanges { target: lv; currentIndex:
visualModel.count - 1 }
}
}
regards,
Bea
_______________________________________________
Qt-qml mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-qml