11-15-2012 04:57 PM
How might one go about setting an alternating background colour on listview cells?
My goal is to use 100% QML to do this.
Thanks!
Solved! Go to Solution.
11-15-2012 05:04 PM
In a list item component
Container {
id: myitem
layout: DockLayout {
}
background: {
if(myitem.ListItem.indexPath % 2 == 0) {
return Color.Black
} else {
return Color.White
}
}
}
11-15-2012 05:15 PM
Knew it had to be something easy.
Still wrapping my head around QML.
Thanks a lot!
11-15-2012 05:24 PM