FormatRange Class

( QTextLayout::FormatRange )

The QTextLayout::FormatRange 結構用於為文本布局內容中的指定區域應用額外格式信息。 更多...

頭: #include <FormatRange>
qmake: QT += gui

公共變量

QTextCharFormat format
int length
int start
bool operator!= (const QTextLayout::FormatRange & lhs , const QTextLayout::FormatRange & rhs )
bool operator== (const QTextLayout::FormatRange & lhs , const QTextLayout::FormatRange & rhs )

詳細描述

The QTextLayout::FormatRange 結構用於為文本布局內容中的指定區域應用額外格式信息。

另請參閱 QTextLayout::setFormats () 和 QTextLayout::draw ().

成員變量文檔編製

QTextCharFormat FormatRange:: format

指定要應用的格式。

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.

相關非成員

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

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

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

返迴 true 若 start , length ,和 format fields in lhs and rhs contain the same values respectively.