I am new to Qt, so this could be an error on my end. I am having a strange issue with my application where when I change a row of the table to something that would now be filtered out of the table by the QSortFilterProxyModel, the application crashes. I have attached my code as I think it is pretty minimal test case.

Ways to cause crash:
1. "search" filtering
a. type amy in search bar
b. edit customer name, change to henry
c. click away and it will crash
2. "open job" filtering
a. be on open jobs tab
b. change status of job to 8
c. click away and it will crash

I believe the crash is an index out of bounds on a vector that occurs when the filter removes that row from the table. I have no idea how to make it have this behavior without crashing.

The relevant code is in the MainWindow constructor.

Any help is much appreciated.

JobLog.zip