The main qpageview module¶
This is a generic paged view widget.
Its main design goal is to display the pages of a PDF document, but it can display any set of images or pages, originating from different documents.
Every page is represented by a Page instance, which encompasses all logic for the document type, i.e. drawing etc.
Pages are managed by a PageLayout.
A PageLayout can be set to a View so the pages are displayed.
The images from a PDF, SVG of possibly other document are cached, and rendering is tile-based, to support zooming in at great detail. Also a magnifier is available, which by default pops up at Ctrl+click.
Because the qpageview is built on Qt, we use the Qt convention to have camelCase method names and CamelCase class names.
- class View(parent=None, **kwds)[source]¶
Bases:
LinkViewMixin
,HighlightViewMixin
,ShadowViewMixin
,LongMousePressMixin
,View
Paged view component based on view.View, with all enhancements.
- loadPdf(filename, renderer=None)[source]¶
Convenience function to create a Document with the specified PDF file.
The filename can also be a QByteArray or an already loaded QPdfDocument instance.
- loadSvgs(filenames, renderer=None)[source]¶
Convenience function to create a Document with the specified SVG files.
Each SVG file is loaded in one Page. A filename can also be a QByteArray.