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

Repeater does not refresh role names on model reset

XMLWordPrintable

      When a custom QAbstractItemModel is used within QML as a model of Repeater, the Repeater only exposes to delegates those role names available at the time when the first delegate item is created.

      The exposed role names are not refreshed when the model is reset (after having called QAbstractItemModel::beginResetModel() and QAbstractItemModel::endResetModel(), although the documentation for these methods states a view should do so.

      The only way to have Repeater refresh the roles names is to re-assign the model, i.e. first assign "undefined" to the "model" property, and then assign the model again.

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

            martinj Martin Jones
            jleben Jakob Leben
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes