mirror of git://sigrok.org/pulseview
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:
parent
18a155ce64
commit
a7988e20ee
|
@ -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());
|
||||
|
|
Loading…
Reference in New Issue