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

QML ListView creating delegate instances for ALL model entries

    XMLWordPrintable

Details

    • 37c25c6e7 (dev), 8fae0aa4a (6.5)

    Description

      I'm seeing some cases where a QML ListView will create delegate instances for every single entry in its model, regardless of visibility. For models with a large number of entries, this degrades performance to the point of being completely unresponsive. I would expect the ListView to only create delegate instances for the items that are currently visible or in the cacheBuffer area. A minimal example is attached, which can demonstrate the bug using the qml preview tool.

      I had wondered if this was related to the binding I'm using for the delegate height, since setting a fixed height prevents this behavior. However, setting a non-zero spacing or topMargin on the ListView will prevent the bug, even if the delegate height has the same binding as before. In addition, the bug only seems to occur when using a Window as the top-level control.

      Attachments

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

        Activity

          People

            fabiankosmale Fabian Kosmale
            wumpusmcgrue Steven Schulteis
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes