Class: QgsAbstractRelationEditorWidgetFactory

Factory class for creating relation widgets and their corresponding config widgets

Added in version 3.18.

class qgis.gui.QgsAbstractRelationEditorWidgetFactory[source]

Bases: object

__init__()

Creates a new relation widget factory with given name

__init__(a0: QgsAbstractRelationEditorWidgetFactory)
Parameters:

a0 (QgsAbstractRelationEditorWidgetFactory)

configWidget(self, relation: QgsRelation, parent: QWidget | None) QgsAbstractRelationEditorConfigWidget | None[source]

Override this in your implementation. Create a new configuration widget for this widget type.

Parameters:
  • relation (QgsRelation) – The relation for which the widget will be created

  • parent (Optional[QWidget]) – The parent widget of the created config widget

Return type:

Optional[QgsAbstractRelationEditorConfigWidget]

Returns:

A configuration widget

create(self, config: Dict[str, Any], parent: QWidget | None = None) QgsAbstractRelationEditorWidget | None[source]

Override this in your implementation. Create a new relation widget. Call QgsEditorWidgetRegistry.create() instead of calling this method directly.

Parameters:
  • config (Dict[str, Any]) – The widget configuration to build the widget with

  • parent (Optional[QWidget] = None) – The parent for the wrapper class and any created widget.

Return type:

Optional[QgsAbstractRelationEditorWidget]

Returns:

A new widget wrapper

name(self) str[source]

Returns the human readable identifier name of this widget type

Return type:

str

type(self) str[source]

Returns the machine readable identifier name of this widget type

Return type:

str