PDA

View Full Version : How to change the color of odd (or even) lines in a list of QtreeWidgetItems ?



Sergex
22nd April 2013, 14:53
Hello,

I am using a QTreeWidget to display a list of names. How can I modify the color in each line? My purpose is to set the color of the background line in even or odd lines only, to have a "striped view".

Thanks!

Santosh Reddy
22nd April 2013, 14:57
treeWidget.setAlternatingRowColors(true)