Hi Luca, the code is as simple as creating a memory vector layer, populating a list of QgsField and passing the list to addAttributes method of the provider. It was a simple example for the course. Generally I set the attributes one by one through the layer, inside an editing session This works fine. But addAttributes works only on 32bit.
giovanni On Thu, Dec 12, 2013 at 1:08 PM, G. Allegri <gioha...@gmail.com> wrote: > > During a course students with QGIS Doufur 64 bit (on Windows 7) reported > crashes when using QgsVectorDataProvider::dataProvider().addAttributes() > method. It happens whatever provider we use. > For curiosity, can you post the code of the bug? Some day I tried to use addAttributes, but I found that using initAttributes/setAttrobite makes QGis more stable.
_______________________________________________ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer