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

QSortFilterProxyModel: cannot remove items from proxy-to-source mapping

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Need More Info
    • Priority: Not Evaluated
    • Resolution: Incomplete
    • Affects Version/s: 5.11.1
    • Fix Version/s: None
    • Component/s: Core: Item Models
    • Labels:
      None
    • Environment:
      Windows 10 x64
    • Platform/s:
      Windows

      Description

      I'm currently using my own QAbstractItemModel and QSortFilterProxyModel.

      When I try to delete an item out of my treeview, the whole thing crahes. But only with the lowest items in the treeview:

      XX

       | ------ XX
       
                  |------ YY

      YY = crash when deleting

      Callstack:

      The error occurs, when calling the beginRemoveRows method of QAbstractItemModel.

      After calling q->beginRemoveRows(.......) in remove_proxy_interval, the proxy_to_source vector doesn't work anymore.

       

      If you need any more infos, just ask.

        Attachments

        1. crash.png
          crash.png
          71 kB
        2. crashCallStack.png
          crashCallStack.png
          31 kB
        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:
            swiftbrother swiftbrother
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes