Class: QgsAbstractRelationEditorWidgetFactory

Factory class for creating relation widgets and their corresponding config widgets.

Added in version 3.18.

Note

This is an abstract class, with methods which must be implemented by a subclass.

The following methods must be implemented: configWidget(), create(), name(), type()

Abstract Methods

configWidget

Override this in your implementation.

create

Override this in your implementation.

name

Returns the human readable identifier name of this widget type

type

Returns the machine readable identifier name of this widget type

class qgis.gui.QgsAbstractRelationEditorWidgetFactory[source]

Bases: object

__init__()

Creates a new relation widget factory with given name

__init__(a0: QgsAbstractRelationEditorWidgetFactory)
Parameters:

a0 (QgsAbstractRelationEditorWidgetFactory)

abstract 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

abstract 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

abstract name(self) str[source]

Returns the human readable identifier name of this widget type

Return type:

str

abstract type(self) str[source]

Returns the machine readable identifier name of this widget type

Return type:

str