i would like to add an attribute with the python console:
i'm using this code:
from PyQt4.QtCore import *from PyQt4.QtGui import *layer = iface.addVectorLayer("C:/donnees_SIG/05.shp","nou","ogr")layer = iface.activeLayer()layer.startEditing()layer.addAttribute(QgsField("STATUT", QVariant.Int)) But it doesn't work...When i write the last line, the python console returns 'False'.Could you help me?I'm using QGIS 2.8.1
Thanks
أكثر...
i'm using this code:
from PyQt4.QtCore import *from PyQt4.QtGui import *layer = iface.addVectorLayer("C:/donnees_SIG/05.shp","nou","ogr")layer = iface.activeLayer()layer.startEditing()layer.addAttribute(QgsField("STATUT", QVariant.Int)) But it doesn't work...When i write the last line, the python console returns 'False'.Could you help me?I'm using QGIS 2.8.1
Thanks
أكثر...