Quote Originally Posted by ars View Post
I have to override QwtLinearScaleEngine::autoScale() method.
Yes, nothing wrong about it.

Uwe

Qt Code:
  1. class YourScaleEngine: public QwtLinearScaleEngine
  2. {
  3. ...
  4.  
  5. virtual void autoScale( int maxNumSteps,
  6. double &x1, double &x2, double &stepSize ) const
  7. {
  8. if ( x1 == x2 )
  9. {
  10. x1 = ...;
  11. x2 = ...;
  12. stepSize = ...;
  13.  
  14. return;
  15. }
  16.  
  17. QwtLinearScaleEngine::autoScale( maxNumSteps, x1, x2, stepSize );
  18. }
  19. };
To copy to clipboard, switch view to plain text mode