The currentIndex does not follow the swipe and scrolling of the list by default For doing this, you have to set up:
highlightRangeMode: ListView.StrictlyEnforceRange Ciao, Gianluca. > On 2 Jul 2015, at 08:31, Kristoffersen, Even (NO14) > <even.kristoffer...@honeywell.com> wrote: > > Try to add the following in your items/delegates: > > Component.onCompleted { > ListView.view.currentIndex = index; > } > > -Even > >> -----Original Message----- >> From: interest-bounces+even.kristoffersen=honeywell....@qt-project.org >> [mailto:interest-bounces+even.kristoffersen=honeywell.com@qt- >> project.org] On Behalf Of Jason H >> Sent: 1. juli 2015 16:57 >> To: interest@qt-project.org >> Subject: [Interest] ListView currentItem not changing (5.4) >> >> I'm trying to use a ListView with a VisualItemModel >> >> The ListView is horizontal and displays three "first time" help screens. The >> user can swipe left/right between them. Only one is ever on the screen at >> once. >> The user is also provided forward/back buttons. >> >> highlightFollowCurrentItem: true >> snapMode: ListView.SnapToItem >> >> The buttons work. And the swiping works visually, but the buttons and >> swiping cannot be used in combination because the >> onCurrentItemChanged/onCurrentIndexChanged never fires. >> >> How can I know what screen the user has swiped to? >> >> Thanks. >> >> _______________________________________________ >> Interest mailing list >> Interest@qt-project.org >> http://lists.qt-project.org/mailman/listinfo/interest > _______________________________________________ > Interest mailing list > Interest@qt-project.org > http://lists.qt-project.org/mailman/listinfo/interest _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest