[QGIS-Developer] How to call add feature attributes dialog from a plugin

C Hamilton adenaculture at gmail.com
Fri Nov 17 09:02:23 PST 2017


When a points vector layer is enabled for editing, and the "Add Feature"
tool is selected, when you click on the map you get a popup dialog ("Points
- Feature Attributes") that allows you to enter the vector layer attributes.

Is it possible to programmatically access this dialog from a plugin that is
going to add a point to the map, but would like an attribute dialog to pop
up for entering the attributes? I would rather make use of the existing
function and not reinvent it.

Is there a difference between these two functions when adding a feature to
a vector layer other than the first adds a single feature and the second
can add multiple features?

layer.addFeature(feature)
layer.dataProvider().addFeatures([feature])


Thanks,

Calvin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20171117/12c52b6f/attachment.html>


More information about the QGIS-Developer mailing list