[PyQt] Fwd: bug in repainting of qtreeview

Pavol Mravec palo at ksp.sk
Mon May 21 00:05:39 BST 2007


I have a custom model displayed by qtreeview. It looks like this (a
root with a child):

|    Root
   |-- Child1


To reproduce this bug expand root node, click on child1, then click on root.

When you do this, I expect the row of root to be drawn as selected
(blue background in my style), and the whole row with child1 as
unselected(white background in my style)

But the area to the left of the text "Child1" where the "tree" is
painted, is not redrawn -- it remains blue. The row with root is drawn
correctly.

When I resize the window, the qtreeview repaints itself and everything
is drawn ok. But when I again select child1 and then root, the area to
the left of the text "child1" remains blue but it should be white.

Pavol Mravec


More information about the PyQt mailing list