forked from qt-creator/qt-creator
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:
@@ -372,6 +372,7 @@ void TextBrowserHelpWidget::wheelEvent(QWheelEvent *e)
|
|||||||
// view in a broken way. We handle it properly through the sequence:
|
// view in a broken way. We handle it properly through the sequence:
|
||||||
// HelpViewer::wheelEvent() -> LocalHelpManager::setFontZoom() ->
|
// HelpViewer::wheelEvent() -> LocalHelpManager::setFontZoom() ->
|
||||||
// HelpViewer::setFontZoom() -> TextBrowserHelpViewer::setFontAndScale().
|
// HelpViewer::setFontZoom() -> TextBrowserHelpViewer::setFontAndScale().
|
||||||
|
e->ignore();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user