Uploaded image for project: 'Qt Extensions'
  1. Qt Extensions
  2. QTEXT-6

TreeView: QSortFilterProxyModel sort causes the view to go out of sync

    XMLWordPrintable

Details

    • c1a411f1ea9ab60ad5326b99d328886e69425a82 (qt-extensions/qttreeview/master)

    Description

      TreeView with a QSortFilterProxyModel goes out of sync with the model data upon sort operations.

      • The expansion state of a row doesn't change i.e. an item that was expanded before sorting might not be expanded after sorting. Instead another item that was put onto the previously expanded row will now appear expanded instead
      • Sort only affects one column. The rest of the columns are untouched.
      • Item children do not keep up with the sort and may appear under a wrong parent item after sort

      This seems to be fixed by resetting the model property of TreeView.

      Steps to reproduce the problem:

      1. Run the attached example
      2. Expand a few items & try sorting

      Attachments

        For Gerrit Dashboard: QTEXT-6
        # Subject Branch Project Status CR V

        Activity

          People

            richard Richard Moe Gustavsen
            miikapernu Miika Pernu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes