[QGIS-Developer] Selecting specific tool from interface with PyQGIS
Adam Borczyk
adam.borczyk at gis-support.pl
Thu Jun 21 03:53:59 PDT 2018
Oh well, found it just a minute after sending this mail, sorry to bother
you.
Answer:
iface.actionAddFeature().trigger()
On 21 June 2018 at 12:49, Adam Borczyk <adam.borczyk at gis-support.pl> wrote:
> Hi all,
>
> I'm looking for a way to enable "Add polygon" tool from the editing
> toolbar using PyQGIS (v3) - so the 4th icon from the left. This way when I
> press a button in my plugin, I'd have a cursor ready to draw features,
> instead of having to manually click the icon. I tried setting the map tool
> to QgsMapToolAdvancedDigitizing, but it's not the way.
>
>
>
> Is there a way to do it?
>
> Best regards
> Adam Borczyk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20180621/dc048dce/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 10310 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20180621/dc048dce/attachment.png>
More information about the QGIS-Developer
mailing list