I have a multi-column QTableView that is populated from a QList and is updated every 10 seconds in case new elements are added to the list. To do the update I remove the rows then reinsert rows from the new list. However, there are times when I get weird results like more rows in the view than elements in the list, then on the next update things may be ok again. I have a feeling it has something to do with the way I’m removing rows and inserting the new ones but all my attempts to correct it have failed. Anyone have any suggestions. I have searched for examples but most all that I find are Sql examples or examples with 1 column. I have tried using the beginRemoveRows/beginInsertRows but I get an error because they are protected even though I’m using a standard model.
↧