PDA

View Full Version : Programmatically Customizing Style of Tree Widget



LevelFour
7th February 2010, 11:47
Greetings,

Although I have a qss style sheet for the application, I would like to programmatically customize the look of certain widgets. Specifically, I would like to set the images used for each state in a tree widget (State_Children, State_Item, State_Open, State_Sibling).

If anyone has some sample code for programmatically customizing the style of a tree widget, it would save hours of hair pulling :-)

Many thanks for any advice,

JB

aamer4yu
8th February 2010, 05:58
Read about delegates.
QStyledItemDelegate and QItemDelegate.