Qwt中鼠标获取坐标点

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 }                    
Qwt获取坐标

 

posted @ 2014-12-06 20:30  木白木又寸  阅读(1327)  评论(0编辑  收藏  举报