[Qt-interest] Memory Management in Qt

Denis Mingulov denis at mingulov.com
Tue Oct 26 08:16:09 CEST 2010


Hi,

On Tue, Oct 26, 2010 at 9:01 AM, Ramesh <ramesh.bs at robosoftin.com> wrote:
> Qlistview *list = new Qlistview;
> QStandardItemModel  *mModel = new QStandardItemModel();
Both 'list' and 'mModel' has to be deleted manually in this case.

> QsandardItem *item = new QsandardItem(“Hi”);
> mModel->appendRow(item);
Ownership is transferred to the model.

-- 
Best Regards,
Denis Mingulov




More information about the Qt-interest-old mailing list