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

    上一话题

    QTextLine

    下一话题

    QFontDatabase

    QTextInlineObject

    概要

    详细描述

    PySide.QtGui.QTextInlineObject class represents an inline object in a PySide.QtGui.QTextLayout .

    This class is only used if the text layout is used to lay out parts of a PySide.QtGui.QTextDocument .

    The inline object has various attributes that can be set, for example using, PySide.QtGui.QTextInlineObject.setWidth() , PySide.QtGui.QTextInlineObject.setAscent() ,和 PySide.QtGui.QTextInlineObject.setDescent() . The rectangle it occupies is given by PySide.QtGui.QTextInlineObject.rect() , and its direction by isRightToLeft() . Its position in the text layout is given by at() , and its format is given by PySide.QtGui.QTextInlineObject.format() .

    class PySide.QtGui. QTextInlineObject
    class PySide.QtGui. QTextInlineObject ( QTextInlineObject )
    参数: QTextInlineObject PySide.QtGui.QTextInlineObject
    PySide.QtGui.QTextInlineObject. ascent ( )
    返回类型: PySide.QtCore.qreal

    Returns the inline object's ascent.

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

    Returns the inline object's descent.

    PySide.QtGui.QTextInlineObject. format ( )
    返回类型: PySide.QtGui.QTextFormat

    Returns format of the inline object within the text layout.

    PySide.QtGui.QTextInlineObject. formatIndex ( )
    返回类型: PySide.QtCore.int

    Returns an integer describing the format of the inline object within the text layout.

    PySide.QtGui.QTextInlineObject. height ( )
    返回类型: PySide.QtCore.qreal

    Returns the inline object's total height. This is equal to PySide.QtGui.QTextInlineObject.ascent() + PySide.QtGui.QTextInlineObject.descent() + 1.

    PySide.QtGui.QTextInlineObject. isValid ( )
    返回类型: PySide.QtCore.bool

    Returns true if this inline object is valid; otherwise returns false.

    PySide.QtGui.QTextInlineObject. rect ( )
    返回类型: PySide.QtCore.QRectF

    Returns the inline object's rectangle.

    PySide.QtGui.QTextInlineObject. setAscent ( a )
    参数: a PySide.QtCore.qreal

    Sets the inline object's ascent to a .

    PySide.QtGui.QTextInlineObject. setDescent ( d )
    参数: d PySide.QtCore.qreal

    Sets the inline object's decent to d .

    PySide.QtGui.QTextInlineObject. setWidth ( w )
    参数: w PySide.QtCore.qreal

    Sets the inline object's width to w .

    PySide.QtGui.QTextInlineObject. textDirection ( )
    返回类型: PySide.QtCore.Qt.LayoutDirection

    Returns if the object should be laid out right-to-left or left-to-right.

    PySide.QtGui.QTextInlineObject. textPosition ( )
    返回类型: PySide.QtCore.int

    The position of the inline object within the text layout.

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

    Returns the inline object's width.