In general you should call beginInsertRows() and endInsertRows(). But I would suggest to avoid a situation when the vector can be modified outside of the model. Instead add any methods you might need to the model class that will operate on the vector. In those methods make sure you emit signals the model expects to be emitted.
Bookmarks