Simple Qt Image Viewer Widget with support for panning, zoom and rotations. Implemented as an QOpenGLWidget.
Follow these instructions to embed the image viewer into your project:
- Add
siimageviewer.h
andsiimageviewer.cpp
to your project. - Create an empty widget and promote it to
SiImageViewer
. - Call
setImage(const QImage& image)
to set the current image.
All you need to show an image is a QImage
instance, which can be created from memory or file.
Shortcut | Description |
---|---|
Scroll Wheel |
Fast zooming |
Shift + Scroll Wheel |
Precise zooming |
Scroll Wheell Press |
Panning |
Ctrl + R |
Rotation in 90 degree steps |
R + Left Mouse Button |
Rotation in 90 degree steps |
Shift + R + Left Mouse Button |
Precise rot. around cursor |
R |
Reset all transformations |
To get a quick look the repository contains a small main window where you can open an image and interact with the viewer.
To build this project open it in QtCreator or manually build it given the CMakeLists.txt.