我无法清除 a 中的项目QCustomPlot
。该方法QCustomPlot::itemCount()
始终返回 0。
QCustomPlot *plot = new QCustomPlot(this);
qDebug() << plot->itemCount(); // returns 0
QCPItemText *textLabel = new QCPItemText(plot);
qDebug() << plot->itemCount(); // returns 0
也许QCPItemText
不被视为一个项目,但我该如何清除QCPItemText
呢?还是重置QCustomPlot
?