QCustomPlot Discussion and Comments

How to select a graph in qcp 2.0Return to overview

Earlier we could use the function setSelected(true) but now it doesn't exist anymore so how do we use it ?

Hi!
I'm also interested to this question.
Moreover I would to know if exists a way to show graph information in a legend only after selection.

Read the http://www.qcustomplot.com/index.php/tutorials/userinteractions and have a look at the examples from full package http://www.qcustomplot.com/index.php/download

From user interaction tutorial:
"For example, setting customPlot->setInteraction(QCP::iSelectPlottables, true) will allow the user to select plottables (e.g. graphs) by clicking on them. "

You should rather look here:
http://www.qcustomplot.com/documentation/dataselection.html

The user interaction tutorials on the website are still for 1.3 (will be updated upon 2.0 release, and switched to a versioned website layout).
The documentation is up to date with 2.0
Essentially you set the selectability to stWhole, and then select any data point (e.g. the first one with index 0), and the whole graph will appear selected.