Quote Originally Posted by maxpower View Post
I did have a QSqlTableModel open but I used clear and still receive the error.
clear() should be enough, but the problem is that you have many such models and you clear only one of them. You have a memory leak --- each time loadTableView() is invoked, you create a new model and you never delete it.