From 0b96a1b76b869d8227e10ec1dd6aa9c21ba5ff13 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Wed, 6 Oct 2021 11:35:05 +0200 Subject: [PATCH] Ignore the wheel event explicitly in order to propagate it further MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Qt 6 brings a behavioral change regarding delivery of wheel events: 92df790f46b3a8b17aec2f385d6472fd3f8647f6 and 2a857ee28315c5bacfe2ecaf402ca9005b35c20e. If there is an event filter installed and wheel event is being processed, the event is now accepted by default, which means that after returning true from eventFilter(), the event is not propagated anymore. Since we want to redirect the event to the parent HelpViewer object, we explicitly ignore the event prior to returning true. Task-number: QTCREATORBUG-26369 Change-Id: I2fc8b7c8bfbc343a9ca7951684ced405f8a55039 Reviewed-by: Robert Löhning --- src/plugins/help/litehtmlhelpviewer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/help/litehtmlhelpviewer.cpp b/src/plugins/help/litehtmlhelpviewer.cpp index c33ebf62ef5..8d54e01b69c 100644 --- a/src/plugins/help/litehtmlhelpviewer.cpp +++ b/src/plugins/help/litehtmlhelpviewer.cpp @@ -235,8 +235,10 @@ bool LiteHtmlHelpViewer::eventFilter(QObject *src, QEvent *e) { if (isScrollWheelZoomingEnabled() && e->type() == QEvent::Wheel) { auto we = static_cast(e); - if (we->modifiers() == Qt::ControlModifier) + if (we->modifiers() == Qt::ControlModifier) { + e->ignore(); return true; + } } return HelpViewer::eventFilter(src, e); }