Denis, Try this:
fields = layer.pendingFields() f.setFields(fields) - Nathan On Thu, Apr 25, 2013 at 5:48 PM, Denis Rouzaud <[email protected]>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 > [email protected] > http://lists.osgeo.org/**mailman/listinfo/qgis-**developer<http://lists.osgeo.org/mailman/listinfo/qgis-developer> >
_______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
