I have a QStandardDataModel that is associated with a table view. There is a rest button on the form. When the reset is clicked it calls a method that clears the data model using clear().

I thought that this would eliminate eveything associatd with the model so that the next time I use the model I'm starting at the begining. That is not the case.

There are 4 columns of data. After the clear(), when I populated the model again I have 8 columns (last 4 being empty). And this continues.

How do I effectively clear the data model so that on the next resue it only displays the data set and not empty items.