Got a QStandardItemModel on my QTableView and trying to remove all the rows in it.
I was first calling a method I created with a call to takeRow, which does not delete the object if I'm right.
What about removeRows from QAbstractItemModel? I've tried it, and as I had a signal on the model ( dataChanged ), it seems that the signal hasn't been disconnected cause I still have some error in the background like "Underlying C/C++ object has been deleted" when I try to delete, and then add some new rows.
Am I missing something here..?
Did you follow the advice on subclassing model classes? I only encountered such problems if I didn't followed the hints in the docs ;)

A removeRows() implementation must call beginRemoveRows() before the rows are removed from the data structure, and endRemoveRows() immediately afterwards.
QStandardItemModel removeRows does not remove signals on cells?