FormatRange Class | Qt GUI 5.12.10

- Qt 5.12
- Qt GUI
- C++ Classes
- FormatRange
- Qt 5.12.10 Reference Documentation

# FormatRange Class

(QTextLayout::FormatRange)

The QTextLayout::FormatRange structure is used to apply extra formatting information for a specified area in the text layout's content. More...

Header: | #include <FormatRange>
qmake: | QT += gui

- List of all members, including inherited members

## Public Variables

QTextCharFormat | format
int | length
int | start

## Related Non-Members

bool | operator!=(const QTextLayout::FormatRange &lhs, const QTextLayout::FormatRange &rhs)
bool | operator==(const QTextLayout::FormatRange &lhs, const QTextLayout::FormatRange &rhs)

## Detailed Description

The QTextLayout::FormatRange structure is used to apply extra formatting information for a specified area in the text layout's content.

See also QTextLayout::setFormats() and QTextLayout::draw().

## Member Variable Documentation

### QTextCharFormat FormatRange::format

Specifies the format to apply.

### int FormatRange::length

Specifies the numer of characters the format range spans.

### int FormatRange::start

Specifies the beginning of the format range within the text layout's text.

## Related Non-Members

### bool operator!=(const QTextLayout::FormatRange &lhs, const QTextLayout::FormatRange &rhs)

Returns true if any of the `start`, `length`, or `format` fields in lhs and rhs contain different values respectively.

### bool operator==(const QTextLayout::FormatRange &lhs, const QTextLayout::FormatRange &rhs)

Returns true if the `start`, `length`, and `format` fields in lhs and rhs contain the same values respectively.