QTextItem¶
The QTextItem
class provides all the information required to draw text in a custom paint engine. More…
Synopsis¶
Functions¶
Detailed Description¶
When you reimplement your own paint engine, you must reimplement drawTextItem()
, a function that takes a QTextItem
as one of its arguments.
- class PySide6.QtGui.QTextItem¶
- PySide6.QtGui.QTextItem.RenderFlag¶
Constant
Description
QTextItem.RightToLeft
Render the text from right to left.
QTextItem.Overline
Paint a line above the text.
QTextItem.Underline
Paint a line under the text.
QTextItem.StrikeOut
Paint a line through the text.
- PySide6.QtGui.QTextItem.ascent()¶
- Return type
float
Corresponds to the ascent
of the piece of text that is drawn.
- PySide6.QtGui.QTextItem.descent()¶
- Return type
float
Corresponds to the descent
of the piece of text that is drawn.
- PySide6.QtGui.QTextItem.font()¶
- Return type
Returns the font that should be used to draw the text.
- PySide6.QtGui.QTextItem.renderFlags()¶
- Return type
RenderFlags
Returns the render flags used.
- PySide6.QtGui.QTextItem.text()¶
- Return type
str
Returns the text that should be drawn.
- PySide6.QtGui.QTextItem.width()¶
- Return type
float
Specifies the total width of the text to be drawn.
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.