Answer the question
In order to leave comments, you need to log in
Deleting an element from a Qt container causes the dynamically created object to be deleted?
I will show everything with an example.
QMap<int, PlotCurve*> m_curveMap;
// ...
PlotCurve* curve = new PlotCurve(this, data);
m_curveMap[id] = curve;
// ...
m_curveMap.remove(id);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question