Hello,

I've created a class that inherits from QwtPlot, and then added a slot connected to a signal caught at mouse drag/move events:

Qt Code:
  1. class UI : public QwtPlot
  2. {
  3. public:
  4.  
  5. UI ( ) : ...
  6. {
  7. ...
  8. _pickerMachine = std::make_shared<QwtPickerDragPointMachine>();
  9. _picker->setStateMachine( _pickerMachine.get() );
  10. connect( _picker.get(), SIGNAL ( moved ( QPoint ) ), this, SLOT ( callback ( QPoint ) ) );
  11. ...
  12. }
  13.  
  14. public slots:
  15.  
  16. void callback ( QPoint point )
  17. {
  18. std::cout << "move callback to: " << point.x() << "," << point.y() << std::endl;
  19. }
  20.  
  21. private:
  22. ...
  23. }
To copy to clipboard, switch view to plain text mode 

I understand that I can ask for a replot, although I'm not sure how. Been searching for a few hours but couldn't find much info.
My callback does get signaled the position of the mouse click, how can I move the plot to use as center the QPoint where the mouse click occured?