[Qt-interest] Free QAbstractItemView's model manually?

slayer81 at gmx.de slayer81 at gmx.de
Sat Sep 18 08:42:58 CEST 2010


Hello!

In QListView it says, that the QListView does not take ownership of the data model, because model can be shared between more than one views. Therefore, when setting a new model with setModel() method, it advises us to 
free the former model memory.

When deleting a QListView, do I also have to take care of freeing the memory of the model? If so, when is it save to free the model regarding the order of destructor calls to model and view?

Thank you,
Paule





More information about the Qt-interest-old mailing list