PDA

View Full Version : reset method in QAbstractTableModel



TorAn
1st August 2010, 12:51
This method is protected in the QAbstractTableModels. Therefore in my derived classes I need to publish it or create a wrapper method to allow reset when all underlying data changes.

Question - may be I am missing something and there is another way to say to the model that the data set changes? "reset" being protected is clearly a design choice, but I am not sure why, because in each and every class that is derived from QAbstractTableModel I have to add a way to reset the data.

saa7_go
2nd August 2010, 05:06
Question - may be I am missing something and there is another way to say to the model that the data set changes?

You can use/emit QAbstractItemModel::layoutChanged() signal.