> > nevertheless the problem remain the same: if i try to load the data
> > from a table without geometry, values for i.attributes()[1] remain empty.
Hi Luca,
I tried your sample code and it works... I don't know what's wrong in your
situation...
If your problem remain the same,
I could suggest you to use QgsFeatureRequest with NoGeometry flag
(see Detailed Description in:
http://www.qgis.org/api/classQgsFeatureRequest.html )
Example:
layer = QgsMapLayerRegistry.instance().mapLayersByName('your_table')[0]
iter =
layer.getFeatures(QgsFeatureRequest().setFlags(QgsFeatureRequest.NoGeometry))
for feat in iter:
print feat.attributes()
print feat.attributes()[0]
print feat.attributes()[1]
Ciao!
Enzo_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer