Sorry, it has already been aswered, did not see the threads.

> Le 15 sept. 2017 à 16:46, David Marteau <dmart...@3liz.com> a écrit :
> 
> Hi
> 
> If  FeatureIterator is a true iterator then use:
> 
> feature = next(FeatureIterator)
> 
> 
>> Le 15 sept. 2017 à 14:43, Andreas Neumann <a.neum...@carto.net 
>> <mailto:a.neum...@carto.net>> a écrit :
>> 
>> Hi,
>> 
>> While porting a project from QGIS 2x to 3x I came across a Python issue:
>> 
>> In QGIS 2.x I had a code like below working:
>> 
>> feature = FeatureIterator.next()
>> 
>> In QGIS 3x it says that object has no attribut next.
>> 
>> How do I access the first result of a feature iterator in QGIS 3?
>> 
>> I don't want to loop, because I know that my FeatureIterator always has just 
>> one result. I just want to access this first feature.
>> 
>> Thanks for your help,
>> 
>> Andreas
>> 
>> _______________________________________________
>> QGIS-Developer mailing list
>> QGIS-Developer@lists.osgeo.org <mailto:QGIS-Developer@lists.osgeo.org>
>> List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
> 

_______________________________________________
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

Reply via email to