PDA

View Full Version : QTreeView: how to draw root decoration but no further indents



joeld42
10th June 2010, 02:29
I'm using stylesheets, too, if there's a way with that.. basically what I want is to have the root level indent and show the little +, - icons, but the next level no further indented (the tree only has one level).

setIndentation( 0 ) almost works but the root decorations don't show up
setRootIsDecorated( False) is like the opposite of what I want

Any ideas?

thanks,
joel

aamer4yu
10th June 2010, 06:35
I guess delegates will be the way to go.
You will need to set the rects properly and call the base class drawings..
You can also override drawChecks in QItemDelegate class