QCustomPlot Discussion and Comments

QCPAbstractItem subclass removing itself from parent plotReturn to overview

Hello,

is something like:

//inside QCPAbstractItem subclass destructor
this->parentPlot()->removeItem(this);

safe?

no. any item added to QCustomPlot is controlled by the plot. calling removeItem will delete the data again. depending on your compiler, you may crash or get stuck in an infinite loop.