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

ListView not rendering some items when the attached model is inserting more rows than would fit into the view

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 5.6.2
    • 5.6.0
    • None
    • Mac 10.9 + 10.11, Windows 7
    • 5d23470b8d0bacb0e0ba074672f94e526cc9e456

    Description

      If an attach AbstractItemModel to an QML ListView insert more rows (using beginInsertRows() and endInsertRows() than ListView can show immediately (i.e. without scrolling), later insertions of more rows doesn't let the new rows being rendered at all - leading to a visual empty space in the list view. When then scrolling or resizing the list view items suddenly appear.

      Tracing shows that items are build and layout correctly, but simply not rendered (it seems).

      Increasing the "cacheBuffer" property of ListView "fixes" the problem (until you insert even more rows in one go).

      I've attach a small example App with a custom QAbstractItemModel + QML file demonstrating this. The contained README.md describes how to show it.

      Attachments

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

        Activity

          People

            steveire Stephen Kelly (Personal)
            hvellyr Gregor Klinke
            Votes:
            5 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes