I'm using QwtLegend to insert legends in my plot area, I setted my legend as CheckableItem and I added a connection:

Qt Code:
  1. connect(plot.at(iPlotCounter), SIGNAL(legendChecked(QwtPlotItem *, bool)),this,
  2. SLOT(setConfig(QwtPlotItem *, bool)));
To copy to clipboard, switch view to plain text mode 

Normally my plot has 8 curves and there is a possibility that two curves have the same legend name (the same title). I know it's possible to get the name when I click on one legend:

Qt Code:
  1. void MainWindow::setConfig(QwtPlotItem * te, bool ta)
  2. {
  3. if (ta==true)
  4. {
  5. qDebug() << te->title().text() << "\n";
  6. qDebug() << te-> << "\n";
  7. }
  8. }
To copy to clipboard, switch view to plain text mode 

But because of the problem that I can have two legends with the same name, get the name doesn't help me so much. So, I was wondering if there is a possibility to get an ID, for example, when I add each legend, maybe there is a value for each, in my case 8, maybe an ID that comes from 0 to 7, I don't know.

Anyone knows if is there an ID, a specific number for each legend or the only possibility is using the name?

Thanks in advance
Best Regards