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

    上一话题

    QTextFormat

    下一话题

    QTextTableFormat

    QTextFrameFormat

    继承者: QTextTableFormat

    概要

    函数

    详细描述

    PySide.QtGui.QTextFrameFormat class provides formatting information for frames in a PySide.QtGui.QTextDocument .

    A text frame groups together one or more blocks of text, providing a layer of structure larger than the paragraph. The format of a frame specifies how it is rendered and positioned on the screen. It does not directly specify the behavior of the text formatting within, but provides constraints on the layout of its children.

    The frame format defines the PySide.QtGui.QTextFrameFormat.width() and PySide.QtGui.QTextFrameFormat.height() of the frame on the screen. Each frame can have a PySide.QtGui.QTextFrameFormat.border() that surrounds its contents with a rectangular box. The border is surrounded by a PySide.QtGui.QTextFrameFormat.margin() around the frame, and the contents of the frame are kept separate from the border by the frame's PySide.QtGui.QTextFrameFormat.padding() . This scheme is similar to the box model used by Cascading Style Sheets for HTML pages.

    ../../_images/qtextframe-style.png

    PySide.QtGui.QTextFrameFormat.position() of a frame is set using PySide.QtGui.QTextFrameFormat.setPosition() and determines how it is located relative to the surrounding text.

    The validity of a PySide.QtGui.QTextFrameFormat object can be determined with the PySide.QtGui.QTextFrameFormat.isValid() 函数。

    class PySide.QtGui. QTextFrameFormat
    class PySide.QtGui. QTextFrameFormat ( fmt )
    class PySide.QtGui. QTextFrameFormat ( QTextFrameFormat )
    参数:

    Constructs a text frame format object with the default properties.

    Creates a new frame format with the same attributes as the given text format.

    PySide.QtGui.QTextFrameFormat. Position

    This enum describes how a frame is located relative to the surrounding text.

    常量 描述
    QTextFrameFormat.InFlow  
    QTextFrameFormat.FloatLeft  
    QTextFrameFormat.FloatRight  
    PySide.QtGui.QTextFrameFormat. BorderStyle

    This enum describes different border styles for the text frame.

    常量 描述
    QTextFrameFormat.BorderStyle_None  
    QTextFrameFormat.BorderStyle_Dotted  
    QTextFrameFormat.BorderStyle_Dashed  
    QTextFrameFormat.BorderStyle_Solid  
    QTextFrameFormat.BorderStyle_Double  
    QTextFrameFormat.BorderStyle_DotDash  
    QTextFrameFormat.BorderStyle_DotDotDash  
    QTextFrameFormat.BorderStyle_Groove  
    QTextFrameFormat.BorderStyle_Ridge  
    QTextFrameFormat.BorderStyle_Inset  
    QTextFrameFormat.BorderStyle_Outset  

    另请参阅

    PySide.QtGui.QTextFrameFormat.borderStyle() FrameBorderStyle

    PySide.QtGui.QTextFrameFormat. border ( )
    返回类型: PySide.QtCore.qreal

    Returns the width of the border in pixels.

    PySide.QtGui.QTextFrameFormat. borderBrush ( )
    返回类型: PySide.QtGui.QBrush

    Returns the brush used for the frame's border.

    PySide.QtGui.QTextFrameFormat. borderStyle ( )
    返回类型: PySide.QtGui.QTextFrameFormat.BorderStyle

    Returns the style of the frame's border.

    PySide.QtGui.QTextFrameFormat. bottomMargin ( )
    返回类型: PySide.QtCore.qreal

    Returns the width of the frame's bottom margin in pixels.

    PySide.QtGui.QTextFrameFormat. height ( )
    返回类型: PySide.QtGui.QTextLength

    Returns the height of the frame's border rectangle.

    PySide.QtGui.QTextFrameFormat. leftMargin ( )
    返回类型: PySide.QtCore.qreal

    Returns the width of the frame's left margin in pixels.

    PySide.QtGui.QTextFrameFormat. margin ( )
    返回类型: PySide.QtCore.qreal

    Returns the width of the frame's external margin in pixels.

    PySide.QtGui.QTextFrameFormat. padding ( )
    返回类型: PySide.QtCore.qreal

    Returns the width of the frame's internal padding in pixels.

    PySide.QtGui.QTextFrameFormat. pageBreakPolicy ( )
    返回类型: PySide.QtGui.QTextFormat.PageBreakFlags

    Returns the currently set page break policy for the frame/table. The default is QTextFormat.PageBreak_Auto .

    PySide.QtGui.QTextFrameFormat. position ( )
    返回类型: PySide.QtGui.QTextFrameFormat.Position

    Returns the positioning policy for frames with this frame format.

    PySide.QtGui.QTextFrameFormat. rightMargin ( )
    返回类型: PySide.QtCore.qreal

    Returns the width of the frame's right margin in pixels.

    PySide.QtGui.QTextFrameFormat. setBorder ( border )
    参数: border PySide.QtCore.qreal

    设置 width (in pixels) of the frame's border.

    PySide.QtGui.QTextFrameFormat. setBorderBrush ( brush )
    参数: brush PySide.QtGui.QBrush

    设置 brush used for the frame's border.

    PySide.QtGui.QTextFrameFormat. setBorderStyle ( style )
    参数: style PySide.QtGui.QTextFrameFormat.BorderStyle

    设置 style of the frame's border.

    PySide.QtGui.QTextFrameFormat. setBottomMargin ( margin )
    参数: margin PySide.QtCore.qreal

    Sets the frame's bottom margin in pixels.

    PySide.QtGui.QTextFrameFormat. setHeight ( height )
    参数: height PySide.QtGui.QTextLength

    Sets the frame's height .

    PySide.QtGui.QTextFrameFormat. setHeight ( height )
    参数: height PySide.QtCore.qreal

    这是重载函数。

    Sets the frame's height .

    PySide.QtGui.QTextFrameFormat. setLeftMargin ( margin )
    参数: margin PySide.QtCore.qreal

    Sets the frame's left margin in pixels.

    PySide.QtGui.QTextFrameFormat. setMargin ( margin )
    参数: margin PySide.QtCore.qreal

    Sets the frame's margin in pixels. This method also sets the left, right, top and bottom margins of the frame to the same value. The individual margins override the general margin.

    PySide.QtGui.QTextFrameFormat. setPadding ( padding )
    参数: padding PySide.QtCore.qreal

    设置 width of the frame's internal padding in pixels.

    PySide.QtGui.QTextFrameFormat. setPageBreakPolicy ( flags )
    参数: flags PySide.QtGui.QTextFormat.PageBreakFlags
    PySide.QtGui.QTextFrameFormat. setPosition ( f )
    参数: f PySide.QtGui.QTextFrameFormat.Position

    设置 policy for positioning frames with this frame format.

    PySide.QtGui.QTextFrameFormat. setRightMargin ( margin )
    参数: margin PySide.QtCore.qreal

    Sets the frame's right margin in pixels.

    PySide.QtGui.QTextFrameFormat. setTopMargin ( margin )
    参数: margin PySide.QtCore.qreal

    Sets the frame's top margin in pixels.

    PySide.QtGui.QTextFrameFormat. setWidth ( width )
    参数: width PySide.QtCore.qreal

    这是重载函数。

    Convenience method that sets the width of the frame's border rectangle's width to the specified fixed width .

    PySide.QtGui.QTextFrameFormat. setWidth ( length )
    参数: length PySide.QtGui.QTextLength

    Sets the frame's border rectangle's width .

    PySide.QtGui.QTextFrameFormat. topMargin ( )
    返回类型: PySide.QtCore.qreal

    Returns the width of the frame's top margin in pixels.

    PySide.QtGui.QTextFrameFormat. width ( )
    返回类型: PySide.QtGui.QTextLength

    Returns the width of the frame's border rectangle.