Hi Martin, On Mon, 06. Nov 2017 at 16:51:30 +0100, Martin Landa wrote: > layer = QgsVectorLayer("test.sqlite", "test", "ogr") # empty layer > created by GDAL > layer.dataProvider().addAttributes([...]) > layer.updateFields()
Don't use the provider directly, but the layer, ie. startEditing, addFeature, commitChanges - or layer.reload() after changing via the provider. Jürgen -- Jürgen E. Fischer norBIT GmbH Tel. +49-4931-918175-31 Dipl.-Inf. (FH) Rheinstraße 13 Fax. +49-4931-918175-50 Software Engineer D-26506 Norden http://www.norbit.de
signature.asc
Description: PGP signature
_______________________________________________ QGIS-Developer mailing list QGIS-Developer@lists.osgeo.org List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer