Subgroup: Attribute

Class: QgsAttributeEditorRelation

class qgis.core.QgsAttributeEditorRelation

Bases: qgis._core.QgsAttributeEditorElement

This element will load a relation editor onto the form.

Methods

clone
init Initializes the relation from the id
name Return the name of this element
parent Get the parent of this element.
relation Get the id of the relation which shall be embedded
setShowLabel Controls if this element should be labeled with a title (field, relation or groupname).
setShowLinkButton Determines if the “link feature” button should be shown
setShowUnlinkButton Determines if the “unlink feature” button should be shown
showLabel Controls if this element should be labeled with a title (field, relation or groupname).
showLinkButton Determines if the “link feature” button should be shown
showUnlinkButton Determines if the “unlink feature” button should be shown
toDomElement Get the XML Dom element to save this element.
type The type of this element

Attributes

AeTypeContainer
AeTypeField
AeTypeInvalid
AeTypeRelation
clone(self, parent: QgsAttributeEditorElement) → QgsAttributeEditorElement
init(self, relManager: QgsRelationManager) → bool

Initializes the relation from the id

Parameters:relManager – The relation manager to use for the initialization
Returns:true if the relation was found in the relationmanager
relation(self) → QgsRelation

Get the id of the relation which shall be embedded

Returns:the id
setShowLinkButton(self, showLinkButton: bool)

Determines if the “link feature” button should be shown

New in version 2.18.

setShowUnlinkButton(self, showUnlinkButton: bool)

Determines if the “unlink feature” button should be shown

New in version 2.18.

showLinkButton(self) → bool

Determines if the “link feature” button should be shown

New in version 2.18.

showUnlinkButton(self) → bool

Determines if the “unlink feature” button should be shown

New in version 2.18.