[Interest] ListView currentItem not changing (5.4)

Gian Maxera gmaxera at gmail.com
Thu Jul 2 10:18:49 CEST 2015


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.Kristoffersen at 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.com at qt-project.org
>> [mailto:interest-bounces+even.kristoffersen=honeywell.com at qt-
>> project.org] On Behalf Of Jason H
>> Sent: 1. juli 2015 16:57
>> To: interest at 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 at qt-project.org
>> http://lists.qt-project.org/mailman/listinfo/interest
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest




More information about the Interest mailing list