QPdfLinkModel#
The QPdfLinkModel
class holds the geometry and the destination for each link that the specified page
contains. More…
New in version 6.6.
Synopsis#
Properties#
Functions#
Slots#
def
setDocument
(document)def
setPage
(page)
Signals#
def
documentChanged
()def
pageChanged
(page)
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#
This is used in PDF viewers to implement the hyperlink mechanism.
- class PySide6.QtPdf.QPdfLinkModel([parent=None])#
- Parameters:
parent –
PySide6.QtCore.QObject
Constructs a new link model with parent object parent
.
Note
Properties can be used directly when from __feature__ import true_property
is used or via accessor functions otherwise.
- property PᅟySide6.QtPdf.QPdfLinkModel.document: PySide6.QtPdf.QPdfDocument#
This property holds The document to load links from..
- Access functions:
document
()setDocument
(document)Signal
documentChanged
()
- property PᅟySide6.QtPdf.QPdfLinkModel.page: int#
This property holds The page to load links from..
- Access functions:
page
()setPage
(page)Signal
pageChanged
(page)
- PySide6.QtPdf.QPdfLinkModel.Role#
Constant
Description
QPdfLinkModel.Role.Link
A
QPdfLink
object.QPdfLinkModel.Role.Rectangle
Bounding rectangle around the link.
QPdfLinkModel.Role.Url
If the link is a web link, the URL for that; otherwise an empty URL.
QPdfLinkModel.Role.Page
If the link is an internal link, the page number to which the link should jump; otherwise
-1
.QPdfLinkModel.Role.Location
If the link is an internal link, the location on the page to which the link should jump.
QPdfLinkModel.Role.Zoom
If the link is an internal link, the suggested zoom level on the destination page.
- PySide6.QtPdf.QPdfLinkModel.document()#
- Return type:
See also
Getter of property document
.
- PySide6.QtPdf.QPdfLinkModel.documentChanged()#
Notification signal of property document
.
- PySide6.QtPdf.QPdfLinkModel.linkAt(point)#
- Parameters:
point –
PySide6.QtCore.QPointF
- Return type:
Returns a valid
link if found under the point
(given in units of points, 1/72 of an inch), or an invalid link if it is not found. In other words, this function is useful for picking, to handle mouse click or hover.
Getter of property page
.
- PySide6.QtPdf.QPdfLinkModel.pageChanged(page)#
- Parameters:
page – int
Notification signal of property page
.
- PySide6.QtPdf.QPdfLinkModel.setDocument(document)#
- Parameters:
document –
PySide6.QtPdf.QPdfDocument
See also
Setter of property document
.
Setter of property page
.