Class: QgsRelationWidgetWrapper

class qgis.gui.QgsRelationWidgetWrapper(vl: QgsVectorLayer, relation: QgsRelation, editor: QWidget = None, parent: QWidget = None)

Bases: QgsWidgetWrapper

Constructor for QgsRelationWidgetWrapper

Parameters
childEvent()
connectNotify()
createWidget(self, parent: QWidget) → QWidget
Parameters

parent (QWidget) –

Return type

QWidget

customEvent()
disconnectNotify()
initWidget(self, editor: QWidget)
Parameters

editor (QWidget) –

isSignalConnected()
receivers()
relation(self)QgsRelation

The relation for which this wrapper is created.

New in version 3.0.

Return type

QgsRelation

sender()
senderSignalIndex()
setFeature(self, feature: QgsFeature)
Parameters

feature (QgsFeature) –

setShowLabel(self, showLabel: bool)

Defines if a title label should be shown for this widget. Only has an effect after widget() has been called at least once.

New in version 2.18.

Parameters

showLabel (bool) –

setShowLinkButton(self, showLinkButton: bool)

Determines if the “link feature” button should be shown

New in version 2.18.

Parameters

showLinkButton (bool) –

setShowSaveChildEditsButton(self, showSaveChildEditsButton: bool)

Determines if the “save child layer edits” button should be shown

New in version 3.14.

Parameters

showSaveChildEditsButton (bool) –

setShowUnlinkButton(self, showUnlinkButton: bool)

Determines if the “unlink feature” button should be shown

New in version 2.18.

Parameters

showUnlinkButton (bool) –

setVisible(self, visible: bool)

Sets the visibility of the wrapper’s widget.

Parameters

visible (bool) – set to True to show widget, False to hide widget

New in version 2.16.

showLabel(self) → bool

Defines if a title label should be shown for this widget. Only has an effect after widget() has been called at least once.

New in version 2.18.

Return type

bool

showLinkButton(self) → bool

Determines if the “link feature” button should be shown

New in version 2.18.

Return type

bool

showSaveChildEditsButton(self) → bool

Determines if the “save child layer edits” button should be shown

New in version 3.14.

Return type

bool

showUnlinkButton(self) → bool

Determines if the “unlink feature” button should be shown

New in version 2.18.

Return type

bool

timerEvent()
valid(self) → bool
Return type

bool

widgetValueChanged(self, attribute: str, newValue: Any, attributeChanged: bool)

Will be called when a value in the current edited form or table row changes

Forward the signal to the embedded form

Parameters
  • attribute (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

New in version 3.14.