[Qgis-developer] feature setFields crashes

Nathan Woodrow madmanwoo at gmail.com
Thu Apr 25 00:49:54 PDT 2013


Denis,

Try this:

fields = layer.pendingFields()
f.setFields(fields)

- Nathan


On Thu, Apr 25, 2013 at 5:48 PM, Denis Rouzaud <denis.rouzaud at gmail.com>wrote:

> Hi all,
>
> When I write:
>
> f = QgsFeature()
> f.setFields( layer.dataProvider().fields() )
>
> QGIS crashes
>
> Here are the two involved methods
>
> void QgsFeature::setFields    (    const QgsFields *     fields    )
>
> virtual const QgsFields& QgsVectorDataProvider::fields    (     )     const
>
>
> Anybody has an idea??? Did I do something wrong?
>
> Thanks
>
> Denis
> ______________________________**_________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/**mailman/listinfo/qgis-**developer<http://lists.osgeo.org/mailman/listinfo/qgis-developer>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20130425/dd8b3cbd/attachment.html>


More information about the Qgis-developer mailing list