[PyQt] How to Manage highlight on QGraphicsView
matteo.boscolo at boscolini.eu
Wed Jun 9 16:30:56 BST 2010
I have done an implementation of a QGraphicsView that allows me to highlight
Each QGraphicsItem overwrite the following method:
def hoverEnterEvent(self, event):
self.setHiglight() #this set the highlight color
def hoverLeaveEvent(self, event):
self.setColor () #this set the standard color
If I create a line for example in 0,0,100,100 end I pass over with the mouse
pointer the entity is highlighted correctly.
But if I create a circle in 0,0 with radius 200 I'm not able to highlight
the line ..
It seems that the boundingRect of the circle overlap the line .. there is
any way to avoid this overlapping ?
Or other smart method to do the highlight of a QGraphicsItem..?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt