QTextItem Class Reference

[ QtGui module]

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

类型

方法


详细描述

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

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


类型文档编制

QTextItem.RenderFlag

常量 描述
QTextItem.RightToLeft 0x1 Render the text from right to left.
QTextItem.Overline 0x10 Paint a line above the text.
QTextItem.Underline 0x20 Paint a line under the text.
QTextItem.StrikeOut 0x40 Paint a line through the text.

RenderFlags 类型是 typedef 对于 QFlags <RenderFlag>. It stores an OR combination of RenderFlag values.


方法文档编制

QTextItem.__init__ ( self )

QTextItem.__init__ ( self , QTextItem )

float QTextItem.ascent ( self )

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

float QTextItem.descent ( self )

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

QFont QTextItem.font ( self )

Returns the font that should be used to draw the text.

RenderFlags QTextItem.renderFlags ( self )

Returns the render flags used.

QString QTextItem.text ( self )

Returns the text that should be drawn.

float QTextItem.width ( self )

Specifies the total width of the text to be drawn.