I reimplement the mousePressEvent and use QwtPlot::invTransform to transform the coordinate.But it don't work as I expected.

Qt Code:
  1. void plot :: mousePressEvent(QMouseEvent *e)
  2. {
  3. if(e->button() == Qt::LeftButton)
  4. {
  5. QPointF temp = e->posF();
  6. QMessageBox::information(this,tr("information!"),tr("the original x posation is %1 and y posation is %2").arg(temp.x()).arg(temp.y()),QMessageBox::Ok|QMessageBox::Default,QMessageBox::NoButton,QMessageBox::NoButton);
  7. //picker->invTransform()
  8. temp.setX(this->invTransform(QwtPlot::xBottom,temp.x()));
  9. temp.setY(this->invTransform(QwtPlot::yLeft,temp.y()));
  10.  
  11. QMessageBox::information(this,tr("information!"),tr("changed x posation is %1 and y posation is %2").arg(temp.x()).arg(temp.y()),QMessageBox::Ok|QMessageBox::Default,QMessageBox::NoButton,QMessageBox::NoButton);
  12.  
  13. }
  14.  
  15. }
To copy to clipboard, switch view to plain text mode 

well , it look just like 2013-05-23 07:00:57的屏幕截图.png2013-05-23 07:00:34的屏幕截图.png

but the real coordinate in the axis is is not x=688.05 and y=553.371