Desallocate a QStandardItem [SOLVED]
I would like to desallocate a QStandardItem but it doesn't work.
This is my code:
@QStandardItem *qsItem = new QStandardItem(QIcon::QIcon(QString::fromStdString(sImage)),this->sNom.c_str());
It's work when I don't delete the qsItem.
I think they have a memory leak, isn't it ?
Does Qt automaticaly a delete of all Item in a Model when the application Stop ?
The model takes ownership of the item. Don't delete it that way