Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Desallocate a QStandardItem [SOLVED]
kevin44115 last edited by
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