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

QQC2 Flickable scrolling is not linear with clicky wheels on Qt 6.2.0

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4: Low
    • Resolution: Won't Do
    • Affects Version/s: 6.2.0
    • Fix Version/s: None
    • Component/s: Quick: Controls 2
    • Environment:
    • Platform/s:
      Linux/X11

      Description

      I have a mouse with a clicky wheel (both a Logitech G203 1000Hz and a Dell office mouse) and am running Qt 6.2.0 (from the Qt web installer) and QQC2.

      In any app with a Flickable subclass (eg. the left sidebar of the gallery example, or a Qt 6.2+ FileDialog), if I scroll down twice in a row with a click mouse, each scroll adds velocity, and the flickable ends up scrolling around 5-10 times as far as if I scrolled down once. If I scroll down, then immediately afterwards up, the second scroll event can scroll the view far further up than the initial scroll would've gone down.

      My expectation is that if I'm using a clicky mouse, the total scroll distance is proportional to the number of downwards scrolls, minus the number of upwards scrolls. This is how browsers (Chrome and Firefox) on Windows and Linux (outside of macOS) handle smooth scroll for clicky wheels, and I think Qt Widgets's non-smooth scroll works this way too.

      This is somewhat related to QTBUG-80720 (comment). On Qt 5.15, two consecutive downwards scrolls travels slightly less distance than two spaced-out downwards scrolls. I think Qt 6.2's behavior was introduced by https://codereview.qt-project.org/c/qt/qtdeclarative/+/347438 :

      A single rotation of a "clicky" wheel also moves a fixed distance, which is now adjustable via QStyleHints::wheelScrollLines().

      Is this intended to extrapolate to multiple mouse scrolls? Because it doesn't now.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              srutledg Shawn Rutledge
              Reporter:
              nyanpasu64 Nyan Pasu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Gerrit Reviews

                  There are 2 open Gerrit changes