I am not sure about your setup but if you want a widget to update, i.e. get its paintEvent() called by Qt, then you call update() on it.
Cheers,
_
I am not sure about your setup but if you want a widget to update, i.e. get its paintEvent() called by Qt, then you call update() on it.
Cheers,
_
ok that worked. Thank you.
The problem I have now is that the vertical line only shows up only next to the items in the tree view.
This is an issue because if the items only fill half the tree view, then the vertical line only covers half the screen.
I want the line to cover the whole height of the tree view. Is there a way to get the tree size/height?
If you want the line to go on top of all items and even empty space, you could draw it in the view's paintEvent() method.
Or maybe on the viewport, e.g. by setting a custom widget as the viewport.
Cheers,
_
I am still confused at what the OP wants, but it seems you guys do understand - could some one enlighten me please?
To me it sounds as what he wants is to have a custom mouse pointer when over the tree view - for that there is no need to do any custom painting, just set an image to the cursor when it enters the tree view.
==========================signature=============== ==================
S.O.L.I.D principles (use them!):
https://en.wikipedia.org/wiki/SOLID_...iented_design)
Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.
Yes,that's exactly what I mean.
Bookmarks