No, it doesn't. There can even be no real data at all, it can all be generated on the fly (for example the multiplication table).
This is fine as long as the data doesn't change behind the model's back.I chose to populate the data prior to instantiating the model.
No, this is wrong. beginInsertRows()/endInsertRows() doesn't modify the data in any way, it just informs the views that rows are being added in a particular place so that they know they might need to update their viewports.Hence, that is why the layoutChanged() works and beginInsertRows/endInsertRows does not.
This is fine.I simply provide pointers during the intitalization of the model as to where the data resides on the heap via the parent/child members of my base class.
No, as long as you know what you are doing with the pointers inside the structure.
The model doesn't need anything. All access to the data is performed through methods you implement, so you have total control over what is going on.Does the model need more than a shallow copy of the custom data structure?
Bookmarks