[Qgis-developer] Hover events on QgsMapCanvasItem

Theuns Heydenrych theunsheydenrych at gmail.com
Thu Sep 15 06:27:35 PDT 2016


HI
Will I get hover events in a object that is inherited from QgsMapCanvasItem?
I created a class derived from QgsMapCanvasItem and implemented the three
methods hover events.

When instantiating the class I pass it a mapcanvas, and set the
acceptHoverEvents to true.
I also implemented the boundingrect method that returns the bounding rect,
and before I change the bounding rect, I am calling prepareGeometryChange
before updating the bounding rectangle.
I have also checked the hasMouseTracking setting on the mapcanvas and it is
set to true.
But when moving the mouse pointer over the object, no hover events is
coming in?
Should I get hover events, or is it "blocked" in the mapcanvas?

Regards
Theuns Heydenrych
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20160915/60320089/attachment.html>


More information about the Qgis-developer mailing list