|  | Home · Overviews · Examples |

# QTextLine Class Reference
[com.trolltech.qt.gui module]

The `QTextLine` class represents a line of text inside a `QTextLayout`. More...

## Detailed Description

The `QTextLine` class represents a line of text inside a `QTextLayout`.

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 decent() 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`.