Hi All,
I have a QGraphicsScene in witch I add some items like line etc etc ..
Each item derived from QGraphicsItem and implements the hoverEnterEvent and hoverLeaveEvent to change the color of the entity.
Whit this system I can make an highlight when the mouse pass over the item.
Sometimes to highlight the entity I need to go very close to the entity and in case of thin line it's very difficult to get the entity highlighted and selected.
so there is any way to enlarge the mouse grap ?
I try to use the scene.setSelectionArea function passing a bigger rectangle in this way under the scene.mouseMoveEvent
path.addRect(scenePos.x()-self.__grapWithd/2, scenePos.y()+self.__grapWithd/2, self.__grapWithd, self.__grapWithd)
self.setSelectionArea(path)
path=QtGui.QPainterPath()
path.addRect(scenePos.x()-self.__grapWithd/2, scenePos.y()+self.__grapWithd/2, self.__grapWithd, self.__grapWithd)
self.setSelectionArea(path)
To copy to clipboard, switch view to plain text mode
but this code dose not give me any help ..
any help ?
Thanks,
Matteo
Bookmarks