I am using PyQGis API to create a custom application.
How do I allow users to select features with the mouse? Is there a mapTool for this? Surely with a product as powerful as QGIS there must be.
mouse positionpyqgisqgis
I am using PyQGis API to create a custom application.
How do I allow users to select features with the mouse? Is there a mapTool for this? Surely with a product as powerful as QGIS there must be.
Best Answer
There is a class you can inherit from called QgsMapTool which you can override the mouse events to handle user actions.
Like so: https://github.com/NathanW2/qmap/blob/master/src/plugin/point_tool.py
You can find objects under the mouse click for example using code like this: