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

TableView doesn't re-render after QSortFilterProxyModel emits layoutChanged

XMLWordPrintable

    • d973907f6e4aae492dfad3eaad6827ffdc49962b (qt/qtdeclarative/5.12)

      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();

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

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes