[Interest] Quick2 ListView - set current index to a new item when added
Ola Røer Thorsen
ola at silentwings.no
Thu Dec 12 14:36:29 CET 2013
2013/12/11 Preet <prismatic.project at gmail.com>
>
> The index is exposed just as 'index' in the delegate itself.
>
>
Ah. Thank you! Somehow missed that earlier.
> > What's the difference between that one and Component.onCompleted?
>
> I think Component.onCompleted is run any time something creates the
> component, which might not be what you want if you're using the same
> delegate for multiple views. The exact point at which ListView.onAdd
> is called might also vary and that might be important if you're using
> transition animations when modifying the ListView elements.
>
Makes sense now :-)
> There are some other ways you can do it too -- using the
> 'onCountChanged' handler in the ListView, etc.
>
>
Thanks again!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20131212/58e873ce/attachment.html>
More information about the Interest
mailing list