QPdfSelection Class
QPdfSelection 类定义了在 PDF 文档的某一页上选中的文本范围及其几何边界。更多
Header: | #include <QPdfSelection> |
属性
|
|
公共功能
QRectF | boundingRectangle() const |
QList<QPolygonF> | bounds() const |
void | copyToClipboard(QClipboard::Mode mode = QClipboard::Clipboard) const |
int | endIndex() const |
bool | isValid() const |
int | startIndex() const |
QString | text() const |
另请参见 QPdfDocument::getSelection().
属性文档
[read-only]
boundingRectangle : const QRectF
该属性保留了bounds 周围的整体包围矩形(凸形壳)。
访问功能:
QRectF | boundingRectangle() const |
[read-only]
bounds : const QList<QPolygonF>
该属性包含所选文本在页面上所占区域的集合,以多边形表示。多边形的坐标系以页面左上角为原点,单位为点。
注意: 目前,从QPdfDocument::getSelection() 返回的多边形总是矩形;但将来可能会表示更复杂的区域。
访问功能:
QList<QPolygonF> | bounds() const |
[read-only]
endIndex : const int
该属性保存text 页面全文末尾的索引。
访问功能:
int | endIndex() const |
[read-only]
startIndex : const int
该属性保存text 页面全文开头的索引。
访问功能:
int | startIndex() const |
[read-only]
text : const QString
该属性保存所选文本。
访问功能:
QString | text() const |
[read-only]
valid : const bool
该属性表示选择是否有效。
访问函数:
bool | isValid() const |
成员函数文档
void QPdfSelection::copyToClipboard(QClipboard::Mode mode = QClipboard::Clipboard) const
根据所选mode ,将text 复制到system clipboard 。
© 2025 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.