QAbstractTextDocumentLayout::Selection Struct
struct QAbstractTextDocumentLayout::SelectionQAbstractTextDocumentLayout::Selection 类是一个便利类,用于定义选择的参数。更多内容...
公共变量
详细说明
当使用QAbstractTextDocumentLayout::draw()函数为QTextDocument绘制自定义布局时,可利用选择范围指定文档中应被高亮显示的部分。其通过cursor 和format 进行指定。
另请参阅 QAbstractTextDocumentLayout 和PaintContext 。
成员变量文档
QTextCursor Selection::cursor
该变量存储所选内容的光标
其默认值为空光标。
QTextCharFormat Selection::format
该变量存储选择项的格式
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.