PDA

View Full Version : QTreeView branches draw problem



SElsner
23rd May 2012, 09:41
Hello,

I use a standard TreeView (not subclassed) with a subclassed AbstractItemModel. All works well except the standard drawing of branches, which is broken for top level items (see image). The dotted line connecting top level items does not draw for the first item, but for the second (which is also the last top level item in the tree). For the second I would expect the branch to be not drawn at all.
Does somebody know what the problem is? Just tell me what additional info I can provide, I just dont know where to start.

7743



Cheers

Sebastian

tferreira
23rd May 2012, 11:15
Did you set any indentation?

http://qt-project.org/doc/qt-4.8/qtreeview.html#indentation-prop

SElsner
23rd May 2012, 12:56
No, I just checked. Thank you anyway.

tferreira
23rd May 2012, 15:05
It would help if you show us the code.