内容表

上一话题

QTextInlineObject

下一话题

QTextLayout

QTextItem

QTextItem class provides all the information required to draw text in a custom paint engine. 更多

Inheritance diagram of PySide2.QtGui.QTextItem

概要

函数

详细描述

When you reimplement your own paint engine, you must reimplement drawTextItem() , a function that takes a QTextItem as one of its arguments.

class 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. ascent ( )
返回类型

qreal

相当于 ascent of the piece of text that is drawn.

PySide2.QtGui.QTextItem. descent ( )
返回类型

qreal

相当于 descent of the piece of text that is drawn.

PySide2.QtGui.QTextItem. font ( )
返回类型

QFont

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.