Class: QgsTextWidgetWrapper¶
- class qgis.gui.QgsTextWidgetWrapper¶
Bases:
QgsWidgetWrapper
Wraps a label widget to display text
Added in version 3.30.
QgsTextWidgetWrapper(layer: Optional[QgsVectorLayer], editor: Optional[QWidget], parent: Optional[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, a0: QChildEvent | None)¶
- connectNotify(self, signal: QMetaMethod)¶
- createWidget(self, parent: QWidget | None) QWidget | None ¶
- Parameters:
parent (Optional[QWidget])
- Return type:
Optional[QWidget]
- customEvent(self, a0: QEvent | None)¶
- disconnectNotify(self, signal: QMetaMethod)¶
- initWidget(self, editor: QWidget | None)¶
- Parameters:
editor (Optional[QWidget])
- isSignalConnected(self, signal: QMetaMethod) bool ¶
- needsGeometry(self) bool ¶
Returns true if the widget needs feature geometry
- Return type:
bool
- receivers(self, signal: PYQT_SIGNAL) int ¶
- reinitWidget(self)¶
Clears the content and makes new initialization
- sender(self) QObject | None ¶
- senderSignalIndex(self) int ¶
- setFeature(self, feature: QgsFeature)¶
- Parameters:
feature (QgsFeature)
- setText(self, text: str | None)¶
Sets the text code to
htmlCode
- Parameters:
text (Optional[str])
- timerEvent(self, a0: QTimerEvent | None)¶
- valid(self) bool ¶
- Return type:
bool