[Qgis-user] Trapping Kyb/Mouse events during a QGIS geometry edit process

Richard Duivenvoorde rdmailings at duif.net
Sat May 7 03:24:59 PDT 2022


I'd start to look into the advanced digitizing tools code, or in some (older?) cad-like plugins (QAD is a pretty extensive one)? They often also show position/angle/whatever info?

The 'thing' you see during digitizing, is (I think) a QgsGeometryRubberBand

https://qgis.org/pyqgis/3.22/gui/QgsGeometryRubberBand.html#module-QgsGeometryRubberBand

That one has a lot of events....

HTH,

Richard

On 5/7/22 10:46, Zoltan via Qgis-user wrote:
> Hi Listers,
> I'm looking for some pointers as where to start, or keywords to google or recipes to follow (if any).
> 
> I'm looking to trap kyb/mouse events whilst in the middle of a geometry edit.
> If a suitable event is trapped, then to run a subroutine and then return to the edit process by either handing the edit process the same event or generating another event for the edit routine to continue the geometry edit with.
> 
> So I suppose my question is, is where do I insert such kyb/mse event filter.
> 
> Any pointers would be welcome.
> 
> Thanks in advance,
> Zoltan
> 



More information about the Qgis-user mailing list