[Qgis-developer] crash while setting attributes of a new feature
Denis Rouzaud
denis.rouzaud at gmail.com
Mon May 6 02:53:28 PDT 2013
Hi Marco,
Thanks for your reply.
I think this is suposed to work since __setitem__ is defined in the sip
file [0]
[0]
https://github.com/qgis/Quantum-GIS/blob/master/python/core/qgsfeature.sip#L62
On 05/06/2013 11:47 AM, Marco Bernasocchi wrote:
>
> hi denis I dont have the new api completely in mind, but maybe this [0]
> can help you.
>
> [0]
> http://lists.osgeo.org/pipermail/qgis-developer/2013-February/024278.html
>
> Marco Bernasocchi (mobile)
> http://opengis.ch
>
> On May 6, 2013 11:27 AM, "Denis Rouzaud" <denis.rouzaud at gmail.com
> <mailto:denis.rouzaud at gmail.com>> wrote:
>
> Hi all,
>
> I got a crash when I did this:
>
> fields = layer.dataProvider().fields()
> f = QgsFeature()
> f.setFields(fields)
> for field in fields:
> f[field.name <http://field.name>()] = QVariant("1")
>
> Using QVariant or not.
>
> What did I (again) did wrong ????
>
> Greetings,
>
> Denis
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org <mailto:Qgis-developer at lists.osgeo.org>
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20130506/eb97f715/attachment.html>
More information about the Qgis-developer
mailing list