qgis/pyqgis-api-docs-builder

QgsField - setName()

Closed this issue · 1 comments

I've got an error in simple code

field = QgsField()
field.setName("test")
Traceback (most recent call last):
  File "C:\PROGRA~1\QGIS\apps\Python39\lib\code.py", line 90, in runcode
    exec(code, self.locals)
  File "<input>", line 1, in <module>
TypeError: 'str' object is not callable

field.setComment('testcomment') - works

Forget, some happened with my PC