Hi,
a new SQLite layer created using Python libraries:
layer = QgsVectorLayer("test.sqlite", "test", "ogr") # empty layer
created by GDAL
layer.dataProvider().addAttributes([...])
layer.updateFields()
feats = []
for ...:
feat=QgsFeature()
...
feats.append(feat)
layer.AddFeatures(feats)
The new layer is loaded (in pyqgis code), features can be identified,
but attribute table is empty (0 filtered features), see attached
screenshot [1]. When I load created SQLite layer via GUI, attribute
table is filled.
Any idea what is missing/wrong in code? Thanks, Ma
[1] http://geo102.fsv.cvut.cz/~landa/tmp/qgis-no-attrs.png
--
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa
_______________________________________________
QGIS-Developer mailing list
[email protected]
List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer