Class: QgsFieldDomainWidget

A widget for configuration of the properties of a QgsFieldDomain.

Added in version 3.26.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsFieldDomainWidget

Base classes

QWidget

QObject

QPaintDevice

Methods

createFieldDomain

Creates a new field domain using the properties from the widget.

isValid

Returns True if the widget currently represents a valid field domain configuration.

setFieldDomain

Sets the current field domain to show properties for in the widget.

Signals

validityChanged

Emitted whenever the validity of the field domain configuration in the widget changes.

class qgis.gui.QgsFieldDomainWidget[source]

Bases: QWidget

__init__(type: Qgis.FieldDomainType, parent: QWidget | None = None)

Constructor for QgsFieldDomainWidget for the given domain type, with the specified parent widget.

Parameters:
createFieldDomain(self) QgsFieldDomain | None[source]

Creates a new field domain using the properties from the widget.

Caller takes ownership of the returned object.

See also

setFieldDomain()

Return type:

Optional[QgsFieldDomain]

isValid(self) bool[source]

Returns True if the widget currently represents a valid field domain configuration.

Return type:

bool

setFieldDomain(self, domain: QgsFieldDomain | None)[source]

Sets the current field domain to show properties for in the widget.

Parameters:

domain (Optional[QgsFieldDomain])

signal validityChanged(isValid: bool)[source]

Emitted whenever the validity of the field domain configuration in the widget changes.

See also

isValid()

Parameters:

isValid (bool)