The magnifier module¶
The Magnifier magnifies a part of the displayed document.
-
class
Magnifier
[source]¶ Bases:
PyQt5.QtWidgets.QWidget
A Magnifier is added to a View with view.setMagnifier().
It is shown when a mouse button is pressed together with a modifier (by default Ctrl). It can then be resized by moving the mouse is with two buttons pressed, or by wheeling with resizemodifier pressed.
Its size can be changed with resize() and the scale (defaulting to 3.0) with setScale().
If can also be shown programatically with the show() method. In this case it can be dragged with the left mouse button.
Wheel zooming with the modifier (by default Ctrl) zooms the magnifier.
Instance attributes:
showmodifier
:the modifier to popup (Qt.ControlModifier)
zoommodifier
:the modifier to wheel zoom (Qt.ControlModifier)
resizemodifier
:the key to press for wheel resizing (Qt.ShiftModifier)
showbutton
:the mouse button causing the magnifier to popup (by default Qt.LeftButton)
resizebutton
:the extra mouse button to be pressed when resizing the magnifier (by default Qt.RightButton)
MAX_EXTRA_ZOOM
:the maximum zoom (relative to the View’s maximum zoom level)
-
showmodifier
= 67108864¶
-
zoommodifier
= 67108864¶
-
resizemodifier
= 33554432¶
-
MAX_EXTRA_ZOOM
= 1.25¶
-
MIN_SIZE
= 50¶
-
MAX_SIZE
= 640¶