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

QSortFilterProxyModel : flag to only apply to top level items.

    XMLWordPrintable

Details

    Description

      It would be nice to have the ability to set a flag in the QSortFilterProxyModel to ignore children during sorts and filters or even better would be to have the flexibility to indicate the level that the sort/filter should be applied to.

      Use case follows :

      Consider the case where applying a filter to a model with multiple parent level items each with multiple children.

      If this model is attached to a QTableView for viewing only the parent level items sorting and filtering works correctly.

      If the model is attached to a QTreeView for viewing parent level items and their respective children the filter is being applied to both the parents and children.

      For example, if the letter "H" is typed for the filter, all of the parents are removed from the list that do not begin with the letter "H", which is perfect, but all of the children items are removed as well because none of them start with the letter "H" and the pluses are removed from the parent items indicating that they can not be expanded.

      Attachments

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

        Activity

          People

            Unassigned Unassigned
            dettman Dean Dettman (Inactive)
            Votes:
            7 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes