Class: QgsEditorWidgetAutoConfPlugin

class qgis.gui.QgsEditorWidgetAutoConfPlugin

Bases: sip.wrapper

Base class for plugins allowing to pick automatically a widget type for editing fields.

New in version 3.0:

Methods

editorWidgetSetup

Typical scores are:

editorWidgetSetup(self, vl: QgsVectorLayer, fieldName: str) Tuple[QgsEditorWidgetSetup, int]

Typical scores are:

  • 0: no matching type found.

  • 10: a widget has been guessed from the type of field.

  • 20: a widget has been determined from an external configuration (for example a database table)

Parameters
  • vl (QgsVectorLayer) – The vector layer for which this widget will be created

  • fieldName (str) – The field name on the specified layer for which this widget will be created

Return type

Tuple[QgsEditorWidgetSetup, int]

Returns

  • and integer value rating how good is the setup provided by this plugin.

  • score: Where the score is returned (default to 0)