[Qgis-developer] QgsMapCanvasItem and mouse events -- Python

Martin Dobias wonder.sk at gmail.com
Tue Nov 3 06:14:18 EST 2009


On Mon, Nov 2, 2009 at 2:22 PM, Florian El Ahdab <felahdab at gmail.com> wrote:
> Hi
> That's a good idea.
> I will implement the canvas events for now...
> ...but I would really like to understand why those events are not delivered
> to my objects. I think they should, and although it is not a big problem, I
> wouldn't have to rewrite the tests needed to handle the canvasEvent... The
> QGraphicsView should take care of this for me and send the event
> automatically to the right objects.

I think the default implementation of mouse*Event() functions in
QGraphicsView automatically propagates these events to the items. In
QGIS we use our own implementation of these functions so the events
are propagated to current map tool instead of canvas items.

Regards
Martin


More information about the Qgis-developer mailing list