[Qgis-developer] Set QgsVectorLayer.EditType to value map and populate value:description pairs with python
egoddard1010 at gmail.com
Mon Jan 27 11:21:35 PST 2014
I'm running QGIS Master. I would like to update a vector layer's EditType
to a ValueMap and pass in the value:description pairs using python. I
haven't ever used C++ and am having some difficulty understanding the
documentation. Through reading the documentation and trial and error I was
able to adjust the edit type to a Value map with:
vectLayer = iface.ActiveLayer()
where 4 is the id of the attribute I want to update and
QgsVectorLayer.EditType(3) sets the EditType to a Value Map.
And this is where I'm stuck. I can't find anything in the API docs about
how to set the value-description pairs. Any help would be greatly
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Qgis-developer