QSortFilterProxyModel crashes on filtering item out



  • I have included a zip file that contains my test case for this behavior and I do not know the internals of QT well enough to know what is going on. The program crashes because QVector gets out of range.

    How to cause crash in test case:

    1. type "Tom" in search bar
    2. edit "Tom" and change it to something like "Harold"
    3. click out of box to commit change and the application will crash with and index out of range error

    I am not sure how to make editing cells and the active sorting/filtering work at the same time. I assumed it was trivial and this behavior is necessary for my application.
    Any help is appreciated! Link to the test case: https://1drv.ms/u/s!AorbqJ_2ZaIz3mTpOfaPlUXJEoRC


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    You may have unearthed a bug or an edge case. You should check the bug report system to see if it's something known. If not please consider opening a new report providing your sample project and explanation.

    It also crashes on OS X.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.