[Interest] Quick2 ListView - set current index to a new item when added

Preet prismatic.project at gmail.com
Mon Dec 9 15:31:32 CET 2013


On Mon, Dec 9, 2013 at 4:12 AM, Ola Røer Thorsen <ola at silentwings.no> wrote:
> Hi all,
>
> I have a ListView showing a c++ model that changes runtime. Items are added
> and deleted.
>
> When an item is added, how do I set the ListView's current index to the new
> item?

Have you tried connecting to the onAdd() signal and then calling
positionViewAtIndex?

http://doc-snapshot.qt-project.org/qdoc/qml-qtquick-listview.html#positionViewAtIndex-method


Preet



More information about the Interest mailing list