Subgroup: Attribute
Class: QgsAttributeEditorElement¶
-
class
qgis.core.
QgsAttributeEditorElement
¶ Bases:
sip.wrapper
This is an abstract base class for any elements of a drag and drop form.
This can either be a container which will be represented on the screen as a tab widget or ca collapsible group box. Or it can be a field which will then be represented based on the QgsEditorWidget type and configuration. Or it can be a relation and embed the form of several children of another layer.
Methods
clone
Returns a clone of this element. name
Return the name of this element parent
Get the parent of this element. setShowLabel
Controls if this element should be labeled with a title (field, relation or groupname). showLabel
Controls if this element should be labeled with a title (field, relation or groupname). toDomElement
Get the XML Dom element to save this element. type
The type of this element Attributes
AeTypeContainer
AeTypeField
AeTypeInvalid
AeTypeRelation
-
AeTypeContainer
= 0¶
-
AeTypeField
= 1¶
-
AeTypeInvalid
= 3¶
-
AeTypeRelation
= 2¶
-
class
AttributeEditorType
¶ Bases:
int
-
clone
(self, parent: QgsAttributeEditorElement) → QgsAttributeEditorElement¶ Returns a clone of this element. To be implemented by subclasses.
New in version 3.0.
-
name
(self) → str¶ Return the name of this element
Returns: The name for this element
-
parent
(self) → QgsAttributeEditorElement¶ Get the parent of this element.
New in version 3.0.
-
setShowLabel
(self, showLabel: bool)¶ Controls if this element should be labeled with a title (field, relation or groupname).
New in version 2.18.
-
showLabel
(self) → bool¶ Controls if this element should be labeled with a title (field, relation or groupname).
New in version 2.18.
-
toDomElement
(self, doc: QDomDocument) → QDomElement¶ Get the XML Dom element to save this element.
Parameters: doc – The QDomDocument which is used to create new XML elements Returns: A DOM element to serialize this element
-
type
(self) → QgsAttributeEditorElement.AttributeEditorType¶ The type of this element
Returns: The type
-