Class: QgsValueMapSearchWidgetWrapper

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

Bases: QgsSearchWidgetWrapper

Constructor for QgsValueMapSearchWidgetWrapper

Wraps a value map 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.

Parameters
applyDirectly(self) → bool
Return type

bool

childEvent(self, QChildEvent)
clearExpression(self)

clears the expression to search for all features

clearWidget(self)
connectNotify(self, QMetaMethod)
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(self, QEvent)
defaultFlags(self)QgsSearchWidgetWrapper.FilterFlags
Return type

QgsSearchWidgetWrapper.FilterFlags

disconnectNotify(self, QMetaMethod)
expression(self) → str
Return type

str

initWidget(self, editor: QWidget)
Parameters

editor (QWidget) –

isSignalConnected(self, QMetaMethod) → bool
receivers(self, PYQT_SIGNAL) → int
sender(self) → QObject
senderSignalIndex(self) → int
setEnabled(self, enabled: bool)
Parameters

enabled (bool) –

setExpression(self, exp: str)
Parameters

exp (str) –

setFeature(self, feature: QgsFeature)
supportedFlags(self)QgsSearchWidgetWrapper.FilterFlags
Return type

QgsSearchWidgetWrapper.FilterFlags

timerEvent(self, QTimerEvent)
valid(self) → bool
Return type

bool