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

Poor documentation for QSortFilterProxyModel::sortRole and filterRole

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • None
    • None
    • All

    Description

      The QSortFilterProxyModel::sortRole and filterRole properties are strange. They only affect the default implementations of `filterAcceptsRows` and `lessThan`, virtual methods that you typically reimplement to provide custom filtering or sorting. But when reimplementing, these properties lose their entire value it seems.

      More than once, we have had developers who think these properties affect which roles trigger filtering or sorting. You don't want all changes to affect sorting, or filtering, only a few ones.

      At best, the docs could be improved to indicate that these properties only work if you don't reimplement the above-mentioned methods...

      Attachments

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

        Activity

          People

            dfaure_kdab David Faure
            andrhans Andreas Aardal Hanssen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes