QPdfLinkModel#

The QPdfLinkModel class holds the geometry and the destination for each link that the specified page contains. More

Inheritance diagram of PySide6.QtPdf.QPdfLinkModel

New in version 6.6.

Synopsis#

Properties#

Functions#

Slots#

Signals#

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:

parentPySide6.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:
property PᅟySide6.QtPdf.QPdfLinkModel.page: int#

This property holds The page to load links from..

Access functions:
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:

PySide6.QtPdf.QPdfDocument

See also

setDocument()

Getter of property document .

PySide6.QtPdf.QPdfLinkModel.documentChanged()#

Notification signal of property document .

PySide6.QtPdf.QPdfLinkModel.linkAt(point)#
Parameters:

pointPySide6.QtCore.QPointF

Return type:

PySide6.QtPdf.QPdfLink

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.

PySide6.QtPdf.QPdfLinkModel.page()#
Return type:

int

See also

setPage()

Getter of property page .

PySide6.QtPdf.QPdfLinkModel.pageChanged(page)#
Parameters:

page – int

Notification signal of property page .

PySide6.QtPdf.QPdfLinkModel.setDocument(document)#
Parameters:

documentPySide6.QtPdf.QPdfDocument

See also

document()

Setter of property document .

PySide6.QtPdf.QPdfLinkModel.setPage(page)#
Parameters:

page – int

See also

page()

Setter of property page .