errata corrige:

(...)
for field in feat.fields():
       print field.name()
(...)



2013/12/4 G. Allegri <[email protected]>

> Probably I'm not using it correctly.
> I want to retrieve the features within a bbox and obtain one field only.
> Im' doing the following:
>
> request
> = 
> QgsFeatureRequest(bbox).setSubestOfAttributes(['id'],mylayer.pendingFields())
> for feat in mylayer.geFeatures(request):
>    for fields in feat.fields():
>        print field.name()
>
> and I get all the field names printed while I thought I would get only
> 'id'.
> What am I doing wrong?
>
> giovanni
>
> --
> Giovanni Allegri
> http://about.me/giovanniallegri
> blog: http://blog.spaziogis.it
> GEO+ geomatica in Italia http://bit.ly/GEOplus
>



-- 
Giovanni Allegri
http://about.me/giovanniallegri
blog: http://blog.spaziogis.it
GEO+ geomatica in Italia http://bit.ly/GEOplus
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to