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

Add a flag so QSortFilterProxyModel can filter parents without visible children

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • None
    • Active Qt
    • None
    • Any

    Description

      Hi

      I am using QSMP and one thing that is hard to implement without consumming too much resources is filtering an index, whose children are all filtered out.

      Using the `recursiveFilter` flag or another, you could, when an index is filtered, check if all it's siblings are filtered too, and then, emit a signal so that the view would refresh the parent index ?

      This is currently :

      • impossible to do it, as `view.update(index)` does not seems to call again the `filterAcceptsRow`
      • very resource consumming if we have to call `invalidateFilterAcceptsRow` for each parent index.

       
      I have already discussed the matter on the forum, and it seems there is no good solution at the moment.

      https://forum.qt.io/topic/161902/qsortfilterproxymodel-filter-parents-without-visible-children.

       
      Thank you.

       

      PS:I can provide a short exemple using python.

      Attachments

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

        Activity

          People

            owolff Oliver Wolff
            pchar2 p char
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes