[Qgis-developer] problem with forms and python init

Luca Lanteri mescal72 at gmail.com
Fri Dec 20 23:00:05 PST 2013

you are right, the code now works fine.
It was just my fault due to to the fact that I'm trying to take ones
first steps with pygis !

thanks for the support and sorry for the noise.

Btw I also resolve my second problem described in the first mail.


2013/12/21 Enzo Ciarmoli <enzo.ciarmoli at csi.it>:
>> > 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

More information about the Qgis-developer mailing list