• PySide 模块
  • PySide.QtGui
  • 内容表

    上一话题

    QPaintEngine

    下一话题

    QTileRules

    QTextItem

    概要

    函数

    详细描述

    PySide.QtGui.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 PySide.QtGui.QTextItem as one of its arguments.

    class PySide.QtGui. QTextItem
    PySide.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.
    PySide.QtGui.QTextItem. ascent ( )
    返回类型: PySide.QtCore.qreal

    相当于 PySide.QtGui.QFontMetrics.ascent() of the piece of text that is drawn.

    PySide.QtGui.QTextItem. descent ( )
    返回类型: PySide.QtCore.qreal

    相当于 PySide.QtGui.QFontMetrics.descent() of the piece of text that is drawn.

    PySide.QtGui.QTextItem. font ( )
    返回类型: PySide.QtGui.QFont

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

    PySide.QtGui.QTextItem. renderFlags ( )
    返回类型: PySide.QtGui.QTextItem.RenderFlags

    Returns the render flags used.

    PySide.QtGui.QTextItem. text ( )
    返回类型: unicode

    Returns the text that should be drawn.

    PySide.QtGui.QTextItem. width ( )
    返回类型: PySide.QtCore.qreal

    Specifies the total width of the text to be drawn.