widgets
#
Provides an image viewer widget for a Qt application.
- class ImageViewer(parent: QWidget = None)[source]#
Qt widget that displays a zoom-level image pyramid.
Drag while keeping the left mouse button pressed. Zoom in with the + key, zoom out with -. Or use the mouse wheel or pinch gesture on the track pad.
- load(file: Path | None, zoom: int = 0)[source]#
Displays the image loaded from the given
file
.file
is aPath
object pointing to an image file. Currently, only DeepZoom images (.dzi
) are supported.zoom
specifies the initial zoom level, with 0 being most zoomed out and greater numbers being zoomed in. There is no way to determine the maximum zoom other than querying the image.