QCustomPlot Discussion and Comments

Addgraph index managementReturn to overview

Hi Every one,

I am creating several charts using addgraph as follows:


plots is a Qlist as defined below:

QList <QCustomPlot *> plots;

And I am managing this list by adding and removing various Qcustomplot using


Where session, lap & sensor are indexes in a QList structure as defined below:

QList <QList <QList <qint16>>> index_session_courbe;
             QList <QList <qint16>> index_lap_courbe;
                         QList <qint16> index_courbe;

My concern is about the index created by addgraph specially after several cancellations.

How is managed the addgraph index ?
How can I get it?
and do I have to renumber all my plots indexes in my Qlist structure ?

Thks in advance for your usual coop

as far as i know, addgraph returns a pointer to a graph. you wouldnt use indexes, you would just hold the graph pointers in whatever structure you wanted to keep track of them on your side.

Thks Ian, it's working perfectly with the pointer