Merge pull request #520 from tiresiasfromthebai/fix-imageviewer-zoom

Fix the Image Visualizer zoom keys under Qt6
This commit is contained in:
Ernie Pasveer
2026-08-14 07:23:52 -05:00
committed by GitHub
2 changed files with 5 additions and 3 deletions
+3 -1
View File
@@ -19,6 +19,8 @@
QImageViewer::QImageViewer (QWidget* parent) : QWidget(parent) {
setFocusPolicy(Qt::StrongFocus); // So the widget can take focus and receive the +/-/ESC zoom keys.
_zoomFactor = 1.0;
// Setup the widgets
@@ -174,7 +176,7 @@ void QImageViewer::keyPressEvent (QKeyEvent* event) {
}
}
void QImageViewer::enterEvent (QEvent* event) {
void QImageViewer::enterEvent (QEnterEvent* event) {
Q_UNUSED(event);
+2 -2
View File
@@ -38,8 +38,8 @@ class QImageViewer : public QWidget {
protected slots:
void keyPressEvent (QKeyEvent* event);
void enterEvent (QEvent* event);
void leaveEvent (QEvent* event);
void enterEvent (QEnterEvent* event) override;
void leaveEvent (QEvent* event) override;
private:
QImage _image;