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

ListView ScrollView behaves erratically when items are added with an animation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 5.4.0
    • Quick: Controls 1
    • None
    • Windows 7 64bit.

      We have a ListView with a custom model that will load more elements into the end of the list when we hit the bottom of the currently viewable list (a.k.a infinite scroll behaviour).

      The ListView is wrapped in a ScrollView for the vertical scrollbar.

      UI Elements of the ListView are loaded dynamically using a Loader.

      The ListView delegate adds new elements with a SequentialAnimation, done in the ListView.onAdd.

      When the user drags the scroll bar thumb to the bottom of the scroll view, more items are loaded as expected. When the list grows in size to roughly 150 elements, the scroll bar thumb will re-position itself to the middle of scroll view after new elements are added, the ListView itself will now display the elements in the middle of the list to match. This happens every time new elements are added to the bottom of the list.

      If you disable the animations for ListView.onAdd in the delegate, the scroll bar behaves as you expect, when more elements are loaded in, the drag-able thumb stays at the bottom of the scrollbar as expected, and the Listview does not jump back to the middle elements.

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

            kahautam Kari Hautamäki
            neil Neil Williams
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes