5
votes
1answer
93 views

How can I get the field index of the new layer in my script using Python?

I am trying to use layer.changeAttributeValue(fid, fieldIndex, value) to add values to a field in QGIS Basically, I'm creating a plugin which will, if a checkbox is ticked, create a new field, then ...
5
votes
1answer
370 views

How to programmatically associate a layer with a custom UI?

I know it is possible to associate a layer with a custom UI for editing feature attributes using the QGIS interface. But is this possible with Python? This link shows how to achieve the result ...
3
votes
1answer
595 views

Changing attribute data types using PyQGIS

OK, so I've already asked a question how to access attribute data types when developing plugin for QGIS, using PyQGIS. And one helpful member said i should use pendingFields() method on the current ...