Hi all, 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() vectLayer.setEditType(4, QgsVectorLayer.EditType(3)) 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 appreciated! Thanks, Eric
_______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
