Class: QgsTextWidgetWrapper¶
- class qgis.gui.QgsTextWidgetWrapper¶
Bases:
QgsWidgetWrapper
Wraps a label widget to display text
New in version 3.30.
QgsTextWidgetWrapper(layer:
QgsVectorLayer
, editor: QWidget, parent: QWidget) Create a text widget wrapper- Parameters:
layer – The layer on which the feature is
editor – An editor widget. Can be
None
if one should be autogenerated.parent –
A parent widget
Methods
- param parent:
- param editor:
Returns true if the widget needs feature geometry
Clears the content and makes new initialization
- param feature:
Sets the text code to
htmlCode
- rtype:
bool
- childEvent(self, QChildEvent)¶
- connectNotify(self, QMetaMethod)¶
- createWidget(self, parent: QWidget) QWidget ¶
- Parameters:
parent (QWidget) –
- Return type:
QWidget
- customEvent(self, QEvent)¶
- disconnectNotify(self, QMetaMethod)¶
- initWidget(self, editor: QWidget)¶
- Parameters:
editor (QWidget) –
- isSignalConnected(self, QMetaMethod) bool ¶
- needsGeometry(self) bool ¶
Returns true if the widget needs feature geometry
- Return type:
bool
- receivers(self, PYQT_SIGNAL) int ¶
- reinitWidget(self)¶
Clears the content and makes new initialization
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setFeature(self, feature: QgsFeature)¶
- Parameters:
feature (QgsFeature) –
- setText(self, text: str)¶
Sets the text code to
htmlCode
- Parameters:
text (str) –
- timerEvent(self, QTimerEvent)¶
- valid(self) bool ¶
- Return type:
bool