Quote Originally Posted by mariposa View Post
Unfortunately - even after the SVN update - the exported image is not correctly scaled and the plot is just occupying the upper left quarter.
Replace the implementation of MainWindow::exportDocument in the bode example with the code I have posted and check the result. Then try to find out what you are doing wrong in your application.

But this will (as far as I can see it) have the disadvantage that the number of curve points is determined by the size of QRectF( QPointF(0, 0), sz / scaleFactor ). These points are then stretched to the "full" resolution.
No, not with the double based render engine of Qwt 6.

My tests using setDotsPerMeterX/setDotsPerMeterY resulted in a curve that has visible "steps" and I assume this will also be the case for your proposed solution.
When painting to a paint device, that is aligning to integer coordinates (like a QWidget or QImage), Qwt manually rounds certain coordinates - instead of letting Qt floor them. Unfortunately this rounding is based on logical coordinates - not respecting the scale factor of the painter. But this is a bug - not a problem in general.

When you modify the implementation of QwtPainter::isAligning like below you might have some effects because of the flooring but it should be very close to what you expect.

Qt Code:
  1. bool QwtPainter::isAligning( QPainter *painter )
  2. {
  3. if ( painter && painter->transform().isScaling() )
  4. return false;
  5.  
  6. ...
  7. }
To copy to clipboard, switch view to plain text mode 

Uwe

PS: Forget about trying to find your code for Qwt5 - you won't succeed. Better try to support the development of Qwt 6