Ignore the wheel event explicitly in order to propagate it further

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.

This patch fixes the QTextBrowser backend.

Amends 0b96a1b76b

Fixes: QTCREATORBUG-26369
Change-Id: I7a0167c54f830fffab13d73eb91cb2ecbd730c86
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
This commit is contained in:
Jarek Kobus
2021-10-21 10:19:12 +02:00
parent 404cf0f632
commit 474ce0399d

View File

@@ -372,6 +372,7 @@ void TextBrowserHelpWidget::wheelEvent(QWheelEvent *e)
// view in a broken way. We handle it properly through the sequence:
// HelpViewer::wheelEvent() -> LocalHelpManager::setFontZoom() ->
// HelpViewer::setFontZoom() -> TextBrowserHelpViewer::setFontAndScale().
e->ignore();
return;
}
}