Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
5.9.0, 5.9.1, 5.10.0 Alpha
-
None
Description
Steps to reproduce:
- Start example
- Try to scroll with mouse wheel in the tooltip window
Actual Behavior:
Content doesn't scroll in the tooltip window.
Expected Behavior:
Content should scroll in the tooltip window as it does in the main window.
I can reproduce it on Windows 7 and based on the original report it can be reproduced on WIndows 8 too. It works on Windows 10, Linux and other platforms. It works in Qt 5.8.0.
Wheel scrolling doesn't work since this change: https://codereview.qt-project.org/#/c/181048/
This issue has been detected in QtWebEngine. You can find real use case there. The original bug report is this: https://bugreports.qt.io/browse/QTBUG-60723
I've already summarized my findings regarding to this issue in the QTBUG-60723 comments:
Let me elaborate the details a bit first: when we click on the dropdown menu we have 2 windows:
- The browser window (main window)
- The dropdown window which has the Qt::ToolTip flag
When we scroll in the dropdown the "dropdown window" doesn't receive the wheel event because it is handled by the "browser window" on Windows 7. The reason of this is that on Windows 7 (and most probably on Windows 8 too) we get the native handler (HWND) of the main window for both cases. On Linux, for the dropdown window scroll we get the handler of the dropdown window from the OS and I think this behavior is the same on Windows 10.
So, it seems we always get the main window handler for wheel event of "sub-windows" on Windows 7 and the event should be forwarded later to the corresponding sub-window. Changing the dropdown window flag from Qt::ToolTip to Qt::Popup (render_widget_host_view_qt_delegate_widget.cpp) works because the redirection is implemented for popups in QWidgetWindow: http://code.qt.io/cgit/qt/qtbase.git/tree/src/widgets/kernel/qwidgetwindow.cpp#n791
This redirection for ToolTip window was here: http://code.qt.io/cgit/qt/qtbase.git/tree/src/plugins/platforms/windows/qwindowsmousehandler.cpp?h=5.7#n408
This has been removed by https://codereview.qt-project.org/#/c/181048/
Attachments
Issue Links
- is required for
-
QTBUG-60723 [REG 5.8->5.9]: When opening a combobox inside a webpage and using the mouse wheel to scroll the contents will cause it to close the drop down
- Closed
- resulted from
-
QTBUG-57864 [Windows]: Enter/Leave/MouseMove and Wheel events do not go to the event filter when one is installed on a window inside a window container
- Closed