[Qt-qml] Using highlight with listview and multiple models
bea.lam at nokia.com
bea.lam at nokia.com
Fri Jul 29 02:20:14 CEST 2011
Hi Pris,
On 25/07/2011, at 6:33 AM, ext Pris Matic wrote:
> Hi all,
>
> I have a ListView that I'm using with multiple models. The listview has a highlight specified. The highlight works fine for the first model (the one that is loaded when the ListView is loaded), but for subsequent models, the highlight 'disappears' at the final count of the initial model.
>
> So for example, if my first model has a count of 5 items I can move the highlight up and down for all five items, and the list will scroll as expected (highlightFollowsCurrentItem is true). If I change the model (say to something that has 10 items), the highlight will only be visible for the first 5 items, and will disappear for the sixth item and beyond. It will reappear for the first 5 items. The view will still follow the current index as expected for all items.
>
> My highlight delegate is a simple rectangle, and printing out the ListView's count property yields the correct number of items. Everything seems fine, except for the fact that the highlight disappears!
>
> I'd appreciate any help with this...
It sounds like a bug with the recalculation of the highlight position. Could you please file a bug with a reproducible example at bugreports.qt.nokia.com? (Under "Qt" project, with "Declarative (QML)" component)
regards,
Bea
More information about the Qt-qml
mailing list