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

QQmlDelegateModel::_q_modelReset should handle roleNames changes

XMLWordPrintable

    • 837c2f18c (dev), e2f5e9b1f (tqtc/lts-6.2), ab19b7d0d (6.5)

      Per QAbstractItemModel::modelReset() documentation :if a model is reset it should be considered that all information previously retrieved from it is invalid. This includes but is not limited to the rowCount() and columnCount(), flags(), data retrieved through data(), and roleNames().

      Most Qt qml views uses QQmlDelegateModel::_q_modelReset internally to manage modelReset changes, but the implementation currently ignores roleNames() changes leading to incorrect
      values displayed.

      This method should probably rewritten with a simple a call to QQmlDelegateModel::setModel(...) or at least take some inspiration from it and have a call to QQmlAdaptorModel::setModel(...)

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

            qtqmlteam Qt Qml Team User
            vrouille Vincent Rouillé
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes