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

Bindings in delegates attempt to access model data after removal

    XMLWordPrintable

Details

    Description

      The attached testcase shows that the QML ListView attempts to re-evaluate bindings after starting a remove animation.

      That re-evaluation can include an attempt to access data from a model, such as a QAbstractItemModel, for a row which has just been removed.

      That is, the remove animation happens as a result of the QAbstractItemModel::rowsRemoved signal, so there is a 'tension' between the requirements:

      1. An attempt in the delegate to access the data while it fades out.
      2. The row in the model providing access to that data has just been removed.

      The solution could be to cache data retrieved from the model.

      Corresponding mailing list thread:

      http://thread.gmane.org/gmane.comp.lib.qt.devel/24459
      'Binding evaluation during ListView delegate remove animation'

      Attachments

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

        Activity

          People

            qtqmlteam Qt Qml Team User
            ske Steve
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes