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

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

XMLWordPrintable

      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.

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

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            krnekit Nikita Krupenko
            Votes:
            3 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes