Class: QgsValueRelationSearchWidgetWrapper

Wraps a value relation search widget.

This widget will offer a combobox with values from another layer referenced by a foreign key (a constraint may be set but is not required on data level).

It will be used as a search widget and produces expression to look for in the layer.

Class Hierarchy

Inheritance diagram of qgis.gui.QgsValueRelationSearchWidgetWrapper

Base classes

QgsSearchWidgetWrapper

Shows a search widget on a filter form.

QgsWidgetWrapper

Manages an editor widget.

QObject

Methods

onValueChanged

Called when current value of search widget changes

value

class qgis.gui.QgsValueRelationSearchWidgetWrapper[source]

Bases: QgsSearchWidgetWrapper

__init__(vl: QgsVectorLayer | None, fieldIdx: int, parent: QWidget | None = None)

Constructor for QgsValueRelationSearchWidgetWrapper

Parameters:
  • vl (Optional[QgsVectorLayer])

  • fieldIdx (int)

  • parent (Optional[QWidget] = None)

onValueChanged(self)[source]

Called when current value of search widget changes

value(self) Any[source]
Return type:

Any