Hi.

I try to export QwtPlot to png file. I use this function

Qt Code:
  1. void XTrendViewer::makeExport( const QString& fileName )
  2. {
  3. QPicture picture;
  4. QwtPlot::print( picture );
  5.  
  6. QPixmap pixmap( 800, 600 );
  7. pixmap.fill();
  8.  
  9. QPainter painter( &pixmap );
  10. painter.drawPicture( 0,0, picture );
  11. painter.end();
  12. pixmap.save( fileName );
  13. }
To copy to clipboard, switch view to plain text mode 

But I am getting file with white space without image. How to export/save qwtPlot into png, jpg and etc.