![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
![](https://images.cnblogs.com/OutliningIndicators/ExpandedBlockStart.gif)
1 void getPoint(QwtPlot *plot)2 {3 QPoint point = plot->canvas()->mapFromGlobal(QCursor::pos()); 4 QString info.sprintf("x = %g, y = %g",5 plot ->invTransFrom(Qwtplot::xBottom,point.x()),6 plot ->invTransFrom(Qwtplot::yLeft,point.y() 7 ); 8 }
本文共 388 字,大约阅读时间需要 1 分钟。
1 void getPoint(QwtPlot *plot)2 {3 QPoint point = plot->canvas()->mapFromGlobal(QCursor::pos()); 4 QString info.sprintf("x = %g, y = %g",5 plot ->invTransFrom(Qwtplot::xBottom,point.x()),6 plot ->invTransFrom(Qwtplot::yLeft,point.y() 7 ); 8 }
转载于:https://www.cnblogs.com/sangzaohaishui/p/4148731.html