Class: QgsRelationReferenceSearchWidgetWrapper

class qgis.gui.QgsRelationReferenceSearchWidgetWrapper(vl: QgsVectorLayer, fieldIdx: int, canvas: QgsMapCanvas, parent: QWidget = None)

Bases: QgsSearchWidgetWrapper

Constructor for QgsRelationReferenceSearchWidgetWrapper

Parameters
  • vl (QgsVectorLayer) – associated vector layer

  • fieldIdx (int) – associated field index

  • canvas (QgsMapCanvas) – optional map canvas

  • parent (QWidget = None) – parent widget

Wraps a relation reference search widget.

Methods

applyDirectly

rtype

bool

childEvent

clearExpression

clearWidget

connectNotify

createExpression

param flags

createWidget

param parent

customEvent

disconnectNotify

expression

rtype

str

initWidget

param editor

isSignalConnected

onValueChanged

Called when current value of search widget changes

receivers

sender

senderSignalIndex

setEnabled

param enabled

setExpression

param exp

setFeature

supportedFlags

rtype

QgsSearchWidgetWrapper.FilterFlags

timerEvent

valid

rtype

bool

value

Returns a variant representing the current state of the widget.

applyDirectly(self) → bool
Return type

bool

childEvent()
clearExpression()
clearWidget(self)
connectNotify()
createExpression(self, flags: Union[QgsSearchWidgetWrapper.FilterFlags, QgsSearchWidgetWrapper.FilterFlag]) → str
Parameters

flags (Union[QgsSearchWidgetWrapper.FilterFlags) –

Return type

str

createWidget(self, parent: QWidget) → QWidget
Parameters

parent (QWidget) –

Return type

QWidget

customEvent()
disconnectNotify()
expression(self) → str
Return type

str

initWidget(self, editor: QWidget)
Parameters

editor (QWidget) –

isSignalConnected()
onValueChanged(self, value: Any)

Called when current value of search widget changes

Deprecated since version QGIS: 3.10 made private

Parameters

value (Any) –

receivers()
sender()
senderSignalIndex()
setEnabled(self, enabled: bool)
Parameters

enabled (bool) –

setExpression(self, exp: str)
Parameters

exp (str) –

setFeature()
supportedFlags(self) → QgsSearchWidgetWrapper.FilterFlags
Return type

QgsSearchWidgetWrapper.FilterFlags

timerEvent()
valid(self) → bool
Return type

bool

value(self) → Any

Returns a variant representing the current state of the widget.

Return type

Any