Here, the simpe way:
connect(ui->customPlot, SIGNAL(plottableClick(QCPAbstractPlottable*,int, QMouseEvent*)), this, SLOT(graphClicked(QCPAbstractPlottable*,int, QMouseEvent*)));
void JournalWidget::graphClicked(QCPAbstractPlottable *plottable, int dataIndex, QMouseEvent* event) { QDateTime timeTickerValue=QCPAxisTickerDateTime::keyToDateTime( plottable->interface1D()->dataMainKey(dataIndex) ); double paramValue= plottable->interface1D()->dataMainValue(dataIndex); QString message = QString("%1 : (%2, %3)").arg(plottable->name()).arg(paramValue).arg(timeTickerValue.toString(DATETIME_STRING_FORMAT)); QToolTip::showText(event->globalPos(), message); }