<div dir="ltr">Hi all,<div><br></div><div>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:</div>
<div><br></div><div>vectLayer = iface.ActiveLayer()</div><div>vectLayer.setEditType(4, QgsVectorLayer.EditType(3))</div><div><br></div><div>where 4 is the id of the attribute I want to update and QgsVectorLayer.EditType(3) sets the EditType to a Value Map.</div>
<div><br></div><div>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! </div><div><br></div><div>Thanks,</div><div>
Eric</div><div><br></div><div><br></div><div><br></div></div>