QCustomPlot Discussion and Comments

QCPGraph and containersReturn to overview

why i can't push a QCPGraph into any container for example

QVector<QCPGraph> graphs;        
QCPGraph *graph=ui->widget->graph(5);
graphs.push_back(*graph);

and is there a way to fix it

In Qt, you can't push QObjects into containers by value (because they aren't copyable). And QCPGraphs are QObjects.

Store pointers, i.e. use QVector<QCPGraph*> instead, and write
graphs << graph;
(push_back is STL notation)

works just fine,thanks a lot