Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-62727

Wheel event doesn't work in tooltip window on Windows 7




      Steps to reproduce:

      1. Start example
      2. 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:

      1. The browser window (main window)
      2. 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/



          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.



              andysh Andy Shaw
              pvarga Peter Varga
              0 Vote for this issue
              3 Start watching this issue



                  Gerrit Reviews

                  There are no open Gerrit changes