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

    • Bug
    • Resolution: Won't Do
    • P4: Low
    • 6.6.0 Beta1, 6.7.0 FF
    • 6.2.0
    • Quick: Controls 2
    • Linux/X11
    • 84d69e469 (dev), ebd2fe108 (dev), d332c6fd9 (6.5), b1766d9d6 (dev), 06540cdb0 (6.6), ed66cf8a0 (dev), 091ce6477 (6.7)

    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

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

              Dates

                Created:
                Updated:
                Resolved: