[Qgis-developer] best to add a feature on a layer (+ crash)
denis.rouzaud at gmail.com
Tue Apr 2 22:42:29 PDT 2013
I try to add a feature in a layer with only one field (over a few in the
Here is what I tried:
f = QgsFeature()
provider.addFeatures( [f] )
This causes QGIS to crash.
What did I wrong? I should not set field 1 if there is a field 0 in my
Should I set the same number of fields as present in the layer?
Is there another way to achieve this?
Thanks a lot,
More information about the Qgis-developer