When you reimplement your own paint engine, you must reimplement
drawTextItem(), a function that takes aQTextItemas one of its arguments.
QTextItem
¶
PySide2.QtGui.QTextItem.
RenderFlag
¶
|
常量 |
描述 |
|---|---|
|
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. |
PySide2.QtGui.QTextItem.
font
(
)
¶
Returns the font that should be used to draw the text.
PySide2.QtGui.QTextItem.
renderFlags
(
)
¶
RenderFlags
Returns the render flags used.
PySide2.QtGui.QTextItem.
text
(
)
¶
unicode
Returns the text that should be drawn.
PySide2.QtGui.QTextItem.
width
(
)
¶
qreal
Specifies the total width of the text to be drawn.