Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML ListView items are inaccessible because auto-scrolling goes too far

QML ListView items are inaccessible because auto-scrolling goes too far

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 354 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • StokestackS Offline
    StokestackS Offline
    Stokestack
    wrote on last edited by Stokestack
    #1

    Hi all.

    We use a ListView for a file browser in our app, and I discovered that I couldn't get into a particular directory because it whizzes through the ListView pane without stopping. I can't find any setting to control the scroll distance, although it seems to me that this shouldn't be something we have to baby-sit anyway.

    In this video, the list makes it impossible to access two directories:
    ...
    Creative Cloud Files
    data <--- whizzes past
    Desktop <--- whizzes past
    Documents
    ...

    I tried setting snapMode to SnapOneItem, but this breaks the mousewheel entirely (scrolling no longer works).

    Are these known issues?

    I dislike the auto-scrolling behavior anyway. It's fussy and time-consuming to sit there and wait for the list to settle before you can interact with it. I want the list to scroll one row per mousewheel click. Is there a way to opt for this?

    Thanks!

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Are your rows the same height as text?

      You are right, normally ListView "just works" and requires no baby sitting. I suspect your delegates are maybe not reporting their height correctly?

      I dislike the auto-scrolling behavior anyway. It's fussy and time-consuming to sit there and wait for the list to settle before you can interact with it.

      What auto-scroll? You mean the animation of scrolling? You can adjust this by using Flickable (ListView's parent component) properties, see:

      • https://doc.qt.io/qt-5/qml-qtquick-flickable.html#flickDeceleration-prop
      • https://doc.qt.io/qt-5/qml-qtquick-flickable.html#maximumFlickVelocity-prop

      I want the list to scroll one row per mousewheel click. Is there a way to opt for this?

      (Z(:^

      StokestackS 1 Reply Last reply
      0
      • sierdzioS sierdzio

        Are your rows the same height as text?

        You are right, normally ListView "just works" and requires no baby sitting. I suspect your delegates are maybe not reporting their height correctly?

        I dislike the auto-scrolling behavior anyway. It's fussy and time-consuming to sit there and wait for the list to settle before you can interact with it.

        What auto-scroll? You mean the animation of scrolling? You can adjust this by using Flickable (ListView's parent component) properties, see:

        • https://doc.qt.io/qt-5/qml-qtquick-flickable.html#flickDeceleration-prop
        • https://doc.qt.io/qt-5/qml-qtquick-flickable.html#maximumFlickVelocity-prop

        I want the list to scroll one row per mousewheel click. Is there a way to opt for this?

        StokestackS Offline
        StokestackS Offline
        Stokestack
        wrote on last edited by
        #3

        @sierdzio Thanks for the reply.

        ListView was auto-scrolling an entire page (actually, more than an entire page) at a time with a single click of the mousewheel. Cranking flickDeceleration up to 10000 suppressed this behavior sufficiently. Thanks.

        It's unfortunate that the implementation interprets the mousewheel as "flicking," because using a very-high deceleration rate to make a ListView usable with a mouse hobbles it for touch.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved