Selection Class

( QAbstractTextDocumentLayout::Selection )

The QAbstractTextDocumentLayout::Selection 類是定義選定參數的方便類。 更多...

頭: #include <Selection>

公共變量

QTextCursor cursor
QTextCharFormat format

詳細描述

The QAbstractTextDocumentLayout::Selection 類是定義選定參數的方便類。

A selection can be used to specify a part of a document that should be highlighted when drawing custom layouts for QTextDocuments with the QAbstractTextDocumentLayout::draw () 函數。指定它使用 cursor format .

另請參閱 QAbstractTextDocumentLayout and PaintContext .

成員變量文檔編製

QTextCursor Selection:: cursor

This variable holds the selection's cursor.

默認值為 null 光標。

QTextCharFormat Selection:: format

This variable holds the format of the selection.

默認值為 QTextFormat::InvalidFormat .