QTextLine Class
The QTextLine class represents a line of text inside a QTextLayout. More...
| Header: | #include <QTextLine> |
| qmake: | QT += gui |
Note: All functions in this class are reentrant.
Public Types
| enum | CursorPosition { CursorBetweenCharacters, CursorOnCharacter } |
| enum | Edge { Leading, Trailing } |
Detailed Description
A text line is usually created by QTextLayout::createLine().
After being created, the line can be filled using the setLineWidth() or setNumColumns() functions. A line has a number of attributes including the rectangle it occupies, rect(), its coordinates, x() and y(), its textLength(), width() and naturalTextWidth(), and its ascent() and descent() relative to the text. The position of the cursor in terms of the line is available from cursorToX() and its inverse from xToCursor(). A line can be moved with setPosition().