I want to read the field name as string format from a QgsFieldComboBox
.
How to read?
I tried like following but not working for some comparison.
selectedField = self.dlg.QgsFieldcomboBox.currentField
When you use currentField
without ()
you get the method itself, you don't call the method. Use selectedField = self.dlg.QgsFieldcomboBox.currentField()
.
currentField() returns the field name as string.
currentField()
with params! Otherwise you don't call the method. This will return a string.