Class: QgsRelationReferenceWidgetWrapper¶
Wraps a relation reference widget.
Options:
ShowForm If
True
, an embedded form with the referenced feature will be shown.MapIdentification Will offer a map tool to pick a referenced feature on the map canvas. Only use for layers with geometry.
ReadOnly If
True
, will represent the referenced widget in a read-only line edit. Can speed up loading.AllowNULL Will offer NULL as a value.
Relation The ID of the relation that will be used to define this widget.
ReadOnly
Class Hierarchy¶
Base classes¶
Manages an editor widget Widget and wrapper share the same parent |
|
Manages an editor widget Widget and wrapper share the same parent |
|
Methods
Will be called when a value in the current edited form or table row changes |
- class qgis.gui.QgsRelationReferenceWidgetWrapper[source]¶
Bases:
QgsEditorWidgetWrapper
- __init__(vl: QgsVectorLayer | None, fieldIdx: int, editor: QWidget | None, canvas: QgsMapCanvas | None, messageBar: QgsMessageBar | None, parent: QWidget | None = None)
Constructor for QgsRelationReferenceWidgetWrapper
- Parameters:
vl (Optional[QgsVectorLayer])
fieldIdx (int)
editor (Optional[QWidget])
canvas (Optional[QgsMapCanvas])
messageBar (Optional[QgsMessageBar])
parent (Optional[QWidget] = None)
- widgetValueChanged(self, attribute: str | None, newValue: Any, attributeChanged: bool)[source]¶
Will be called when a value in the current edited form or table row changes
- Parameters:
attribute (Optional[str]) – The name of the attribute that changed.
newValue (Any) – The new value of the attribute.
attributeChanged (bool) – If
True
, it corresponds to an actual change of the feature attribute
Added in version 3.42.2.