PDA

View Full Version : QTreeView branch indicator bug?



ugluk
25th May 2012, 16:01
If the first node in a QTreeView does not have children, but the second has, I get the following effect after I expand the node:

7753

Is this a known bug? Could I be doing something wrong? Note, that if I collapse the second node, everything looks normal. The bug persists even if I reset the model.

SElsner
25th May 2012, 22:20
Hey, I amhaving the exact same problem, but found no solution ( http://www.qtcentre.org/threads/49091-QTreeView-branches-draw-problem?highlight= )
It would be cool, if you could post your sample code. I have only an already very complicated view and model, so maybe I find the solution with a more reduced code.
If you find something let us please know!

ugluk
28th May 2012, 10:55
In my case I've implemented QModelIndex parent(const QModelIndex & index) const [pure virtual] wrongly in the QAbstractItemModel. Now that I've fixed it, everything works!