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
List of all members, including inherited members
Class Hierarchy¶
Base classes¶
Manages an editor widget. |
|
Manages an editor widget. |
|
Constructor
Methods
Will be called when a value in the current edited form or table row changes |
Virtual Methods
In PyQGIS, only methods marked as virtual can be safely overridden in a Python subclass of QgsRelationReferenceWidgetWrapper. See the FAQ for more details.
- 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 (QgsVectorLayer|None)
fieldIdx (int)
editor (QWidget|None)
canvas (QgsMapCanvas|None)
messageBar (QgsMessageBar|None)
parent (QWidget|None = None)
- virtual createWidget(self, parent: QWidget | None) QWidget | None[source]¶
- Parameters:
parent (QWidget|None)
- Return type:
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 (str|None) – 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.