How To Change Color in Listview Delegate ?
-
Hello, I have a ListView. How can I change the properties of the elements in delegate? Like the rectangle color?
-
Hello, I have a ListView. How can I change the properties of the elements in delegate? Like the rectangle color?
@NullByte
this might help;
https://stackoverflow.com/questions/13523701/how-to-set-alternate-colors-for-listview-items-in-qml
-
I thinks solution is Connections. It's work.
ColorOverlay { id: favIconOverlay anchors.fill: favIcon source: favIcon color: getColorCode(id) transform: rotation antialiasing: true Connections { target: favoriteModel function onCountChanged(foo) { var newColor = getColorCode(id) if(newColor === '#ed670e') { favIcon.isFav = true } else { favIcon.isFav = false } favIconOverlay.color = newColor } } }