-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
5.15.8
-
None
-
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(...)