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

ListView doesn't rerender all items when item pooling is enabled

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.15.2
    • None
    • Seems to happen on any system I tried, but that was mostly Linux
    • Linux/Wayland, Linux/X11

    Description

      Qt 5.15 added item pooling to QtQuick.ListView, which can be enabled with reuseItems: true. This in general works fine if you have one model with uniformly sized elements.

      If you however reassign the model property and the elements are not uniformly sized or you are currently scrolling, some items don't get properly rerendered/the properties don't get properly reassigned. Instead they still look like they came from the old model. In the attached example this is visible as the elements having the wrong color.

      The example has non uniformly sized elements as well as continuously numbered texts. If you scroll a bit and press the swap button, you can see that some of the items are from the other model. The elements don't need to be of different sizes and you don't need to be scrolling, but that makes it the easiest to demonstrate.

      Attachments

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              deepbluev7 Nicolas Werner
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes