QPdfView — PyQt Documentation v6.9.0 (original) (raw)
PyQt6.QtPdfWidgets.QPdfView
Inherits from QAbstractScrollArea.
Description¶
A PDF viewer widget.
QPdfView is a PDF viewer widget that offers a user experience similar to many common PDF viewer applications, with two pageMode(). In the MultiPage
mode, it supports flicking through the pages in the entire document, with narrow gaps between the page images. In the SinglePage
mode, it shows one page at a time.
Enums¶
PageMode
This enum describes the overall behavior of the PDF viewer:
Member | Value | Description |
---|---|---|
MultiPage | 1 | Allow scrolling through all pages in the document. |
SinglePage | 0 | Show one page at a time. |
ZoomMode
This enum describes the magnification behavior of the PDF viewer:
Member | Value | Description |
---|---|---|
Custom | 0 | Use zoomFactor() only. |
FitInView | 2 | Automatically choose a zoom factor so that the entire page fits in the view. |
FitToWidth | 1 | Automatically choose a zoom factor so that the width of the page fits in the view. |
Methods¶
__init__(QWidget)
Constructs a PDF viewer with parent widget parent.
currentSearchResultIndex() → int
document() → QPdfDocument
documentMargins() → QMargins
See also
mouseMoveEvent(QMouseEvent)
TODO
mousePressEvent(QMouseEvent)
TODO
mouseReleaseEvent(QMouseEvent)
TODO
pageMode() → PageMode
pageNavigator() → QPdfPageNavigator
This accessor returns the navigation stack that will handle back/forward navigation.
pageSpacing() → int
See also
paintEvent(QPaintEvent)
TODO
resizeEvent(QResizeEvent)
TODO
scrollContentsBy(int, int)
TODO
searchModel() → QPdfSearchModel
See also
setCurrentSearchResultIndex(int)
setDocument(QPdfDocument)
setDocumentMargins(QMargins)
See also
setPageMode(PageMode)
setPageSpacing(int)
setSearchModel(QPdfSearchModel)
setZoomFactor(float)
setZoomMode(ZoomMode)
zoomFactor() → float
See also
zoomMode() → ZoomMode
Signals¶
currentSearchResultIndexChanged(int)
TODO
documentChanged(QPdfDocument)
TODO
documentMarginsChanged(QMargins)
TODO
pageModeChanged(PageMode)
TODO
pageSpacingChanged(int)
TODO
searchModelChanged(QPdfSearchModel)
TODO
zoomFactorChanged(float)
TODO
zoomModeChanged(ZoomMode)
TODO