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

TableView doesn't re-render after QSortFilterProxyModel emits layoutChanged

    XMLWordPrintable

Details

    • d973907f6e4aae492dfad3eaad6827ffdc49962b (qt/qtdeclarative/5.12)

    Description

      void QSortFilterProxyModelPrivate::sort()
      {
      ...
          emit q->layoutChanged(QList<QPersistentModelIndex>(), QAbstractItemModel::VerticalSortHint);
      }
      

      After this, the TableView does not immediately reorder the delegates, but flicking back and forth will make it do that.

      A workaround is in my QSortFilterProxyModel subclass (which is necessary mainly because sort() is not Q_INVOKABLE), I can use beginResetModel(); sort(); endResetModel();

      Attachments

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

        Activity

          People

            richard Richard Moe Gustavsen
            srutledg Shawn Rutledge
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes