QTextFrameFormat Class
The QTextFrameFormat class provides formatting information for frames in a QTextDocument. More...
Header: | #include <QTextFrameFormat> |
qmake: | QT += gui |
Inherits: | QTextFormat |
Inherited By: |
Note: All functions in this class are reentrant.
Public Types
enum | BorderStyle { BorderStyle_None, BorderStyle_Dotted, BorderStyle_Dashed, BorderStyle_Solid, ..., BorderStyle_Outset } |
enum | Position { InFlow, FloatLeft, FloatRight } |
Additional Inherited Members
- 27 public functions inherited from QTextFormat
Detailed Description
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 width() and height() of the frame on the screen. Each frame can have a border() that surrounds its contents with a rectangular box. The border is surrounded by a margin() around the frame, and the contents of the frame are kept separate from the border by the frame's padding(). This scheme is similar to the box model used by Cascading Style Sheets for HTML pages.
The position() of a frame is set using setPosition() and determines how it is located relative to the surrounding text.
The validity of a QTextFrameFormat object can be determined with the isValid() function.
See also QTextFrame and QTextBlockFormat.
Member Type Documentation
enum QTextFrameFormat::BorderStyle
This enum describes different border styles for the text frame.
Constant | Value |
---|---|
QTextFrameFormat::BorderStyle_None | 0 |
QTextFrameFormat::BorderStyle_Dotted | 1 |
QTextFrameFormat::BorderStyle_Dashed | 2 |
QTextFrameFormat::BorderStyle_Solid | 3 |
QTextFrameFormat::BorderStyle_Double | 4 |
QTextFrameFormat::BorderStyle_DotDash | 5 |
QTextFrameFormat::BorderStyle_DotDotDash | 6 |
QTextFrameFormat::BorderStyle_Groove | 7 |
QTextFrameFormat::BorderStyle_Ridge | 8 |
QTextFrameFormat::BorderStyle_Inset | 9 |
QTextFrameFormat::BorderStyle_Outset | 10 |
This enum was introduced or modified in Qt 4.3.
See also borderStyle() and FrameBorderStyle.
enum QTextFrameFormat::Position
This enum describes how a frame is located relative to the surrounding text.
Constant | Value |
---|---|
QTextFrameFormat::InFlow | 0 |
QTextFrameFormat::FloatLeft | 1 |
QTextFrameFormat::FloatRight | 2 |
See also position() and CssFloat.