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

QSortFilterProxyModel::mapFromSource returns a valid QModelIndex for the filtered out item

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.9.6, 5.13.0
    • Fix Version/s: None
    • Component/s: Core: Item Models
    • Labels:
      None
    • Platform/s:
      All

      Description

      QSortFilterProxyModel::mapFromSource returns a valid QModelIndex for the child index of the filtered out item. In other words, if B is child of A in the source model and A filtered out by proxy model, QSortFilterProxyModel::mapFromSource returns a valid QModelIndex for B. But invalid QModelIndex for A.

      Attached a project that demonstrates the problems (see assert).

        Attachments

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

          Activity

            People

            Assignee:
            dfaure_kdab David Faure
            Reporter:
            tangran Mikhail K
            Votes:
            9 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes