void MainWindow::mouseMoved(QMouseEvent*event)
{
QVector<double> vx,vy;
double x = ui->customPlot->xAxis->pixelToCoord(event->pos().x());
double y = ui->customPlot->yAxis->pixelToCoord(event->pos().y());
vx<<0<<x<<ui->customPlot->xAxis->range().maxRange;
vy<<y<<y<<y;
ui->customPlot->graph(1)->setData(vx,vy);
ui->customPlot->graph(1)->setPen(QPen(Qt::red));
vx.clear();
vy.clear();
vx<<x<<x<<x;
vy<<0<<y<<ui->customPlot->yAxis->range().maxRange;
ui->customPlot->graph(2)->setData(vx,vy);
ui->customPlot->graph(2)->setPen(QPen(Qt::red));
ui->customPlot->replot();
}