07-10-2012 04:09 PM
Hi,
How to get an alternate color with ListView component ?
Nicolas
07-11-2012 02:36 PM
Hi Nicklas,
I don't think there's an easy way to accomplish this. One solution you could try is use the ListItemManager method by creating the ListItem in c++. Then for each item that is created you can alternate the background color of the item as you wish.
Cheers
Selom.
07-11-2012 02:44 PM
Of course, but it isn't very elegant.
With Qt/Qml it's possible but it doesn't work with cacades.
Color: item.index % 2 ? red : blue
Nicolas
07-13-2012 02:11 AM
07-13-2012 03:31 AM
I'll wait update with horizontal listview scroll
Nicolas
07-15-2012 03:35 AM
07-18-2012 05:41 PM
Does background: item.index % 2 ? Color.red : Color.blue work if your item is a container?
09-06-2012 01:56 PM
Niklas,
Have you retried this with the Beta 2 release?
Graham
09-06-2012 04:17 PM
Doesn't work in the last release.
For the moment, I add the index to my datamodel.
Regards,
Nicolas
09-06-2012 04:20 PM
Probably the best approach in the mean time.
Graham