PySide6.QtPdf.QPdfLinkModel

class 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

Added in version 6.6.

Synopsis

Properties

Methods

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 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.

Note

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

property documentᅟ: QPdfDocument

This property holds The document to load links from..

Access functions:
property pageᅟ: int

This property holds The page to load links from..

Access functions:
__init__([parent=None])
Parameters:

parentQObject

Constructs a new link model with parent object parent.

document()
Return type:

QPdfDocument

See also

setDocument()

Getter of property documentᅟ .

documentChanged()

Notification signal of property documentᅟ .

linkAt(point)
Parameters:

pointQPointF

Return type:

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.

page()
Return type:

int

See also

setPage()

Getter of property pageᅟ .

pageChanged(page)
Parameters:

page – int

Notification signal of property pageᅟ .

setDocument(document)
Parameters:

documentQPdfDocument

See also

document()

Setter of property documentᅟ .

setPage(page)
Parameters:

page – int

See also

page()

Setter of property pageᅟ .