I would like to make programmatically (with Python) the same thing than we can do directly in QGIS when you create a list of values for a field.
I would like to create a new field and specify a list of possible values for this field. I didn't find any function for that in the API. Is there anyone who has the solution?
setEditorWidgetV2Config(...)works, but I get a deprecation warning, are there other approaches? – Jochen Schwarze May 15 '17 at 14:35.qgis2\python\expressionsinstead of value1 ? – Hicham Zouarhi Aug 02 '17 at 15:27