I have a tableView created from a QSqlRelationalTableModel and a proxy model. I use the table to let the user display data to their needs. I use the proxyModel to highlight the high and low values in a column. The user needs to be able to sort the table and remove certain rows. BUT I don't want the underlying source to be modified. I tried to remove the row from the model, but it removed it from the source as well. I tried to hide the row, but then if the user sorted the column, the hidden data becomes available. What would be the best way to do this? The table is not going to be very big. If there isn't a better method, one idea I had was to create another table in my database and store the "original" data (the filtered data from the SQLRelation and filtered data) when the dialog is created. Then if the user wants to revert back to the original data, the dialog could "DROP" the table, Create the table again and repopulate the table row by row. This way the original data would be intact. Is there a method to remove items from a model/view without removing them from the source?
Bookmarks