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…
Synopsis#
Functions#
def
boundingRectangle
()def
bounds
()def
copyToClipboard
([mode=QClipboard.Clipboard])def
endIndex
()def
isValid
()def
startIndex
()def
swap
(other)def
text
()
Detailed Description#
See also
- class PySide6.QtPdf.QPdfSelection(other)#
- Parameters
other –
PySide6.QtPdf.QPdfSelection
- PySide6.QtPdf.QPdfSelection.boundingRectangle()#
- Return type
This property holds the overall bounding rectangle (convex hull) around bounds
.
- PySide6.QtPdf.QPdfSelection.bounds()#
- Return type
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.
Copies text
to the system clipboard
depending on the mode
selected.
- PySide6.QtPdf.QPdfSelection.endIndex()#
- Return type
int
This property holds the index at the end of text
within the full text on the page.
- PySide6.QtPdf.QPdfSelection.isValid()#
- Return type
bool
This property holds whether the selection is valid.
- PySide6.QtPdf.QPdfSelection.startIndex()#
- Return type
int
This property holds the index at the beginning of text
within the full text on the page.
- PySide6.QtPdf.QPdfSelection.swap(other)#
- Parameters
other –
PySide6.QtPdf.QPdfSelection
- PySide6.QtPdf.QPdfSelection.text()#
- Return type
str
This property holds the selected text.