diff --git a/modules/gui/qt/util/flickable_scroll_handler.cpp b/modules/gui/qt/util/flickable_scroll_handler.cpp index 80be34ef194c7755d94d52017b20058b1157cd0f..a31ac24dd2cf74b095bd1d3160f9dcd43c04f0fc 100644 --- a/modules/gui/qt/util/flickable_scroll_handler.cpp +++ b/modules/gui/qt/util/flickable_scroll_handler.cpp @@ -101,14 +101,14 @@ bool FlickableScrollHandler::eventFilter(QObject *watched, QEvent *event) using Type = decltype(ev)::Type; - if (!wheel->pixelDelta().isNull() && (wheel->pixelDelta().manhattanLength() % 120)) + if (!wheel->pixelDelta().isNull() && (wheel->pixelDelta().manhattanLength() % QWheelEvent::DefaultDeltasPerStep)) { ev.delta = wheel->pixelDelta(); ev.type = Type::Pixel; } else if (!m_handleOnlyPixelDelta && !wheel->angleDelta().isNull()) { - ev.delta = wheel->angleDelta() / 8 / 15; + ev.delta = wheel->angleDelta() / QWheelEvent::DefaultDeltasPerStep; ev.type = Type::Degree; } else