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

QSortFilterProxyModel suppresses "roles" parameter of the "dataChanged" signal

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.1.0 , 5.1.1
    • Fix Version/s: 5.5.0
    • Component/s: Widgets: Itemviews
    • Labels:
      None
    • Commits:
      f96baeb75fc36a41d2b08f880536cee5a8041e79

      Description

      QAbstractItemModel has following signal:
      void dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles = QVector<int> ())

      QAbstractItemView has corresponding protected virtual method:
      void QAbstractItemView::dataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles = QVector<int> ()) [virtual protected slot]

      If you add QSortFilterProxyModel (or subclass) between model and view, view receives empty roles vector. As a result, all the pros of that parameter added in Qt 5.0 are negated if QSortFilterProxyModel is used.

      See example in attachment.

        Attachments

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

          Activity

            People

            Assignee:
            peppe Giuseppe D'Angelo
            Reporter:
            sergei.nevdakh Sergei Nevdakh
            Votes:
            9 Vote for this issue
            Watchers:
            9 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes