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

Model reset in QStandardItemModel

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.12.4
    • Fix Version/s: None
    • Component/s: Core: Item Models
    • Labels:
      None

      Description

      When subclassing `QStandardItemModel` a situation arises when the subclass intends to reset the model using `beginResetModel()` and `endResetModel()`. These will emit the `QAbstractItemModel::modelAboutToBeReset()` and `QAbstractItemModel::modelReset()` signals, respectively.

      However, between the begin and the end of the model reset the usual model signals will still be emitted as the item model is manipulated.

      This does not seem entirely correct, yet I am unaware if this causes trouble for views or proxy models. I'm actually not sure about subclassing `QStandardItemModel` at all, although the doc considers it.

        Attachments

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

          Activity

            People

            Assignee:
            dfaure_kdab David Faure
            Reporter:
            kamajii Sven Pauli
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes