Fix the Image Visualizer zoom keys under Qt6

This commit is contained in:
tiresiasfromthebai
2026-08-14 10:43:10 +02:00
parent a465cd5a1a
commit d54df0b1b3
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;