is there a way to check if mouse is over (within) the boundingrect for a qgraphicsitem. (akin to hoverover)
Printable View
is there a way to check if mouse is over (within) the boundingrect for a qgraphicsitem. (akin to hoverover)
Kichi,
Thank You for you response.
I am using that. I need a similar functionally for boundingrect, hover events only fire when the mouse is over the actual image, i want to have a method fire when mouse is over the boundingrect of the image.
It really depends on the context. The simplest way would be to use this:
If you can have the position of the cursor in item coordinates (i.e. in item events containing the cursor position).
If you have the position of the cursor relative to the scene or the view then you can use the family of mapTo* or mapFrom* to get to local coordinates and use the code above.
Thank You Wysota,
I will try that.