I am trying to export a picture in svg format.
With Qwt 5.1 and Qt 4.4 all worked fine.
But now, if I use Qt 4.5.0 I have a plot outside the clipping region, like in the figure.
All clippings are set in the QwtPlotCurve.
Any idea ?
The code is quite standard
void MyPlot::exportSVG()
{
fileName
= QFileDialog::getSaveFileName(this, tr
("Nome file da esportare"), recentExportPath,
"Graphic files ( *svg)");
if ( !fileName.isEmpty() )
{
fileName = MyMath::checkFormat(fileName,"svg");
QSvgGenerator generator;
generator.setFileName(fileName);
generator.
setSize(QSize(1024,
800));
filter.setOptions(options);
print(generator,filter);
}
void MyPlot::exportSVG()
{
QString fileName;
fileName = QFileDialog::getSaveFileName(this, tr("Nome file da esportare"), recentExportPath,"Graphic files ( *svg)");
if ( !fileName.isEmpty() )
{
fileName = MyMath::checkFormat(fileName,"svg");
QSvgGenerator generator;
generator.setFileName(fileName);
generator.setSize(QSize(1024, 800));
QwtPlotPrintFilter filter;
int options = QwtPlotPrintFilter::PrintAll;
options |= QwtPlotPrintFilter::PrintBackground;
options |= QwtPlotPrintFilter::PrintFrameWithScales|QwtPlotPrintFilter::PrintMargin;
filter.setOptions(options);
print(generator,filter);
}
To copy to clipboard, switch view to plain text mode
I tried also qwt 5.2 + qt4.5, but a segfault error happens.
G
Bookmarks