I have set the brush as in this code
plotEnergy->attach(this);
plotEnergy
->setPen
(QPen(Qt
::red));
plotEnergy
->setBrush
(QBrush(Qt
::Dense7Pattern));
plotEnergy = new QwtPlotCurve();
plotEnergy->attach(this);
plotEnergy->setPen(QPen(Qt::red));
plotEnergy->setBrush(QBrush(Qt::Dense7Pattern));
To copy to clipboard, switch view to plain text mode
But when export the pdf I get the picture attached.
The export is done as simple as:
fileName
= QFileDialog::getSaveFileName(this, tr
("Nome file da esportare"),
QDir::homePath(),
"Acrobat ( *pdf)");
if ( !fileName.isEmpty() ) {
printer.
setOutputFormat(QPrinter::PdfFormat);
printer.setOutputFileName(fileName);
printer.setCreator("Solar Calc");
printer.
setOrientation(QPrinter::Landscape);
// if ( printer.colorMode() == QPrinter::GrayScale )
filter.setOptions(options);
print(printer,filter);
QString fileName;
fileName = QFileDialog::getSaveFileName(this, tr("Nome file da esportare"), QDir::homePath(),"Acrobat ( *pdf)");
if ( !fileName.isEmpty() ) {
QPrinter printer(QPrinter::HighResolution);
printer.setOutputFormat(QPrinter::PdfFormat);
printer.setOutputFileName(fileName);
printer.setCreator("Solar Calc");
printer.setOrientation(QPrinter::Landscape);
QwtPlotPrintFilter filter;
// if ( printer.colorMode() == QPrinter::GrayScale )
int options = QwtPlotPrintFilter::PrintAll;
options &= ~QwtPlotPrintFilter::PrintBackground;
options |= QwtPlotPrintFilter::PrintFrameWithScales;
filter.setOptions(options);
print(printer,filter);
To copy to clipboard, switch view to plain text mode
Bookmarks