loper@lists.osgeo.org
*Subject:* Re: [QGIS-Developer] Detect a Map Canvas Mouse Event
I found
QgsMapToolEmitPoint, QgsMapTooland |canvas.setMapTool(…)|
||
|So I declared my class as |AoiSizeValidator(QgsMapToolEmitPoint)
||
|But gave that a try and it gets me x,y, initially but when I select
an add
AM
To: qgis-developer@lists.osgeo.org
Subject: Re: [QGIS-Developer] Detect a Map Canvas Mouse Event
I found
QgsMapToolEmitPoint , QgsMapTool and canvas.setMapTool(...)
So I declared my class as AoiSizeValidator(QgsMapToolEmitPoint)
But gave that a try and it gets me x,y, initially but w
overridden. So looks like I need a different approach to get xy from the map
canvas.
From: QGIS-Developer On Behalf Of
Catania, Luke A ERDC-RDE-GRL-VA CIV via QGIS-Developer
Sent: Wednesday, April 5, 2023 11:27 AM
To: qgis-developer@lists.osgeo.org
Subject: [QGIS-Developer] Detect a Map Canvas Mouse
Trying to get a map canvas event when canvas is clicked and mouse is dragged.
I have code that creates an empty layer, but I use the QGIS edit menu to add
the actually layer. I want to be able to track the mouse movement so I can
calculated the area of the feature being drawn in real time so I