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

Regression: ItemDelegate with overriden contentItem in ListView fails to create on Android

    XMLWordPrintable

Details

    Description

      If I use ItemDelegate with custom contentItem as a delegate in ListView, on scrolling creating some items fail on Android (on Linux it works fine). I also see the following errors:

      :-1 ((null)): <Unknown File>: QML VisualDataModel: Error creating delegate
      

      If I import QtQml.Models, error mention DelegateModel instead of VisualDataModel.

      Test program:

      import QtQuick 2.6
      import QtQuick.Controls 2.0
      
      ApplicationWindow {
          visible: true
          width: 640
          height: 480
      
          ListView {
              anchors.fill: parent
              model: 10000
              delegate: ItemDelegate {
                  contentItem: Label {
                      text: "Item " + model.index
                  }
              }
          }
      }
      

      To reproduce, just scroll the list.

      I don't see such errors on Qt 5.6.

      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
              krnekit Nikita Krupenko
              Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes