Skip to main content
1 of 2
Kadir Şahbaz
  • 78k
  • 57
  • 257
  • 404

You can use field_names = [field.name() for field in layer.fields()] to get field names or other field properties (length, type, comment, ...).

If you just need names, it's sufficient to use field_names = layer.fields().names()

Kadir Şahbaz
  • 78k
  • 57
  • 257
  • 404