Hello. I have to do the following: when I point to the value (big dot - qwtSymbol) a coordinate of this value will be appeared . I found on the internet the method realization and I change it a little:
double distance = 1e99;
int point_index
= first_c
->closestPoint
(QPoint(ev
->x
(), ev
->y
()),
&distance
);
// for my one of my curves
tooltip
->setLabel
(QString("hello"));
//for debugging tooltip->attach(funPlot);
funPlot->replot();
}
void Monitoring::showToolTip(QMouseEvent* ev){
if(ev == QEvent::MouseMove) {
double distance = 1e99;
int point_index = first_c->closestPoint(QPoint(ev->x(), ev->y()), &distance); // for my one of my curves
QwtPlotMarker* tooltip = new QwtPlotMarker();
tooltip->setLabel(QString("hello")); //for debugging
tooltip->attach(funPlot);
funPlot->replot();
}
To copy to clipboard, switch view to plain text mode
But I don't understand how to call this function. I thought I could call it through the signal-slot construction, but I can't pick up appropriate signal.
Bookmarks