From 6a805eaf339547a346386e773f0a02d76db636c7 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Tue, 22 Sep 2020 00:32:20 +0200 Subject: [PATCH] Fix for both QT4 and QT5 --- client/src/proxguiqt.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/src/proxguiqt.cpp b/client/src/proxguiqt.cpp index 512b3369e..23e88343c 100644 --- a/client/src/proxguiqt.cpp +++ b/client/src/proxguiqt.cpp @@ -686,7 +686,11 @@ void Plot::wheelEvent(QWheelEvent *event) { // 120+shift => zoom out 10% const float zoom_offset = 0.1; if (event->modifiers() & Qt::ShiftModifier) { +#if QT_VERSION >= 0x050000 int x = event->position().x(); +#else + int x = event->x(); +#endif x -= WIDTH_AXES; x = (int)(x / GraphPixelsPerPoint); x += GraphStart;