Steps to reproduce:
- Start example
- Try to scroll with mouse wheel in the tooltip window
Content doesn't scroll in the tooltip window.
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
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/