QPdfSelection#

The QPdfSelection class defines a range of text that has been selected on one page in a PDF document, and its geometric boundaries. More

Inheritance diagram of PySide6.QtPdf.QPdfSelection

Synopsis#

Properties#

Functions#

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description#

See also

getSelection()

class PySide6.QtPdf.QPdfSelection(other)#
Parameters:

otherPySide6.QtPdf.QPdfSelection

Note

Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.

property PᅟySide6.QtPdf.QPdfSelection.boundingRectangle: PySide6.QtCore.QRectF#

This property holds the overall bounding rectangle (convex hull) around bounds .

Access functions:
property PᅟySide6.QtPdf.QPdfSelection.bounds#

This property holds a set of regions that the selected text occupies on the page, represented as polygons. The coordinate system for the polygons has the origin at the upper-left corner of the page, and the units are points .

Note

For now, the polygons returned from getSelection() are always rectangles; but in the future it may be possible to represent more complex regions.

Access functions:
property PᅟySide6.QtPdf.QPdfSelection.endIndex: int#

This property holds the index at the end of text within the full text on the page.

Access functions:
property PᅟySide6.QtPdf.QPdfSelection.startIndex: int#

This property holds the index at the beginning of text within the full text on the page.

Access functions:
property PᅟySide6.QtPdf.QPdfSelection.text: str#

This property holds the selected text.

Access functions:
property PᅟySide6.QtPdf.QPdfSelection.valid: bool#

This property holds whether the selection is valid.

Access functions:
PySide6.QtPdf.QPdfSelection.boundingRectangle()#
Return type:

PySide6.QtCore.QRectF

Getter of property boundingRectangle .

PySide6.QtPdf.QPdfSelection.bounds()#
Return type:

Getter of property bounds .

PySide6.QtPdf.QPdfSelection.copyToClipboard([mode=QClipboard.Clipboard])#
Parameters:

modeMode

Copies text to the system clipboard depending on the mode selected.

PySide6.QtPdf.QPdfSelection.endIndex()#
Return type:

int

Getter of property endIndex .

PySide6.QtPdf.QPdfSelection.isValid()#
Return type:

bool

Getter of property valid .

PySide6.QtPdf.QPdfSelection.startIndex()#
Return type:

int

Getter of property startIndex .

PySide6.QtPdf.QPdfSelection.swap(other)#
Parameters:

otherPySide6.QtPdf.QPdfSelection

PySide6.QtPdf.QPdfSelection.text()#
Return type:

str

Getter of property text .