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

Delivery of mouse wheel events to QtQuick Items is erratic

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P3: Somewhat important
    • None
    • 5.10.0
    • None
    • macOS, Windows 7

    Description

      Please try the following example:

      import QtQuick 2.8
      import QtQuick.Window 2.2
      
      Window {
        id: window
        visible: true
        width: 800
        height: 480
        title: qsTr("Hello World")
      
        ListView {
          anchors { top: parent.top; bottom: info.top; left: parent.left }
          width: window.width / 2
          model: 1000
          delegate: Text { text: "List left " + modelData }
          clip: true
        }
      
        ListView {
          anchors { top: parent.top; bottom: info.top; right: parent.right }
          width: window.width / 2
          model: 1000
          delegate: Text { text: "List right " + modelData }
          clip: true
        }
      
        Text {
          id: info
          anchors { bottom: parent.bottom; left: parent.left; right: parent.right }
          text: "<ul><li>Start wheeling down in <b>left</b> list and move mouse pointer to the <b>right</b> list while scrolling is still going on." +
                    "<li>Mac only: Also note that until wheeling was actually startet in the right list <b>once</b> it does not scroll or maybe just a little bit" +
                    "<li>Mac only: When moving the mouse pointer back to the list where wheeling started, that list scrolls back to top and down again"
      
          wrapMode: Text.WordWrap
          color: "red"
        }
      
      }
      

      Expected behavior: Mouse wheel events should only be delievered to the item where the mouse wheel scrolling actually startet. This is how e.g. a QWidget based dialog (with two QListWidgets side by side) or the OS X Finder behave (Sidebar vs. directory listview). So if the mouse pointer leaves a "widget" it should be handled as if the user had stopped scrolling.

      Actual behavior: Wheel events are delivered to the Item hovered by the mouse as long as they are generated. Some other unexpected effects an be observed (see red text in example).

      Behavior between Windows and Mac is slightly different - I suppose this is due to the native support for kinetic scrolling on macOS vs. the emulated kintetic scrolling on Windows?

      Also there seems to be a difference on macOS between scrolling using a touchpad on a macbook (works as expected) and using an apple (bluetooth) mouse (shows erratic behavior).

       

      Attachments

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              njeisecke Nils Jeisecke
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes