viewport: event->position() isn't Qt 5.12, tweak version check

According to https://doc.qt.io/qt-5/qwheelevent.html#position the
QWheelEvent::position() method was introduced in Qt 5.14. Adjust
the Qt version check to unbreak builds with Qt 5.12.
This commit is contained in:
Gerhard Sittig 2022-10-29 21:37:21 +02:00
parent 18a155ce64
commit a7988e20ee
1 changed files with 1 additions and 1 deletions

View File

@ -249,7 +249,7 @@ void Viewport::wheelEvent(QWheelEvent *event)
- delta * view_.scale() + view_.offset());
} else {
// Vertical scrolling is interpreted as zooming in/out
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
view_.zoom(delta / 120.0, event->position().x());
#else
view_.zoom(delta / 120.0, event->x());