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. ListView really slow scrolling

ListView really slow scrolling

Scheduled Pinned Locked Moved Solved QML and Qt Quick
6 Posts 3 Posters 2.7k 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.
  • V Offline
    V Offline
    Vadi2
    wrote on last edited by
    #1

    I'm moving around a QML ListView by setting the currentIndex, and it works - but scrolls excruciatingly slow. How can I speed it up?

    1 Reply Last reply
    0
    • jeremy_kJ Online
      jeremy_kJ Online
      jeremy_k
      wrote on last edited by
      #4

      Have you tried ListView.highlightMoveDuration or highlightMoveVelocity?

      Asking a question about code? http://eel.is/iso-c++/testcase/

      V 1 Reply Last reply
      2
      • jeremy_kJ Online
        jeremy_kJ Online
        jeremy_k
        wrote on last edited by
        #2

        That's a hard question to answer without details.

        • The model could be inefficient. If so, look at improving the efficiency of functions that are called repeatedly, such as QAbstractItemModel::data().
        • The delegate could be complex due to child items and bindings. Either simplify, or move some of it into a delayed construction method such as Loader.
        • Delegate instances might be destroyed, only to be recreated when the view scrolls back in the delegate's direction. Set ListView.cacheBuffer to tell the engine to preserve additional delegate instances outside of the visible area.
        • The system might have insufficient GPU, CPU, memory, or other resources. Is destroying currently unused objects, precomputing results, or delaying evaluations an option?
        • The write pattern for currentIndex might not be supportable. Going from 0 to INT_MAX? Disabling transitions and adopting a trivial delegate might be necessary.

        Asking a question about code? http://eel.is/iso-c++/testcase/

        1 Reply Last reply
        0
        • V Offline
          V Offline
          Vadi2
          wrote on last edited by
          #3

          I appreciate the in-depth answer!

          But I think it's more of an animation scrolling speed that is an issue. Is there any way I can speed it up? See gif: https://imgur.com/a/0eRudVW

          1 Reply Last reply
          0
          • jeremy_kJ Online
            jeremy_kJ Online
            jeremy_k
            wrote on last edited by
            #4

            Have you tried ListView.highlightMoveDuration or highlightMoveVelocity?

            Asking a question about code? http://eel.is/iso-c++/testcase/

            V 1 Reply Last reply
            2
            • GabrielRRG Offline
              GabrielRRG Offline
              GabrielRR
              wrote on last edited by
              #5

              Hello, if the listView is to big you may run into some issues, try using cacheBuffer to adjust the number of preloaded items not visible in the window so it fixes slow dynamic loading . Also use maximumFlickVelocity if your problem is that you want to speed up the scrolling

              Lic-Ing. Jose Gabriel Lopez Villalobos
              Embedded Software Engineer
              RidgeRun Engineering Ltd.
              www.ridgerun.com
              Email: gabriel.lopez@ridgerun.com

              1 Reply Last reply
              0
              • jeremy_kJ jeremy_k

                Have you tried ListView.highlightMoveDuration or highlightMoveVelocity?

                V Offline
                V Offline
                Vadi2
                wrote on last edited by
                #6

                @jeremy_k said in ListView really slow scrolling:

                Have you tried ListView.highlightMoveDuration or highlightMoveVelocity?

                That did it, thanks!

                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