Export QwtPlot to png file with help print
Hi.
I try to export QwtPlot to png file. I use this function
Code:
void XTrendViewer::makeExport( const QString& fileName )
{
pixmap.fill();
painter.drawPicture( 0,0, picture );
painter.end();
pixmap.save( fileName );
}
But I am getting file with white space without image. How to export/save qwtPlot into png, jpg and etc.
Re: Export QwtPlot to png file with help print
Problem is solved. I used qwt 5.2.1 in past and there was this problem. Now I am using qwt 6.0 and class QwtPlotRenderer. Print and export work fine.
But example "body" from new version qwt ( 6.0 ) has not worked when I had tried to export QwtPlot into SVG. In my code I use method QwtPlotRenderer.renderTo and QSvgGenerator for the export.
In example "body" method QwtPlotRenderer.renderDocument is using for this export.