It's all in all a little bit strange. As shown in the pdf-document above, not the whole print is B&W , everything is in color except the amplitude-and phaseline.
so itseems it's not a Qt printer setting (QPrinter::ColorMode).
But you can pass this bug by using the export-function in the example:
1. Export 2 .pdf-document
2. Print the created document
Added after 49 minutes:
Problem solved:
Edit Line 69 of plot.ccp:
d_curve1
->setPen
(QPen(Qt
::yellow));
d_curve1->setPen(QPen(Qt::yellow));
To copy to clipboard, switch view to plain text mode
change it to:
d_curve1
->setPen
(QPen(Qt
::yellow,
2, Qt
::DashLine));
d_curve1->setPen(QPen(Qt::yellow, 2, Qt::DashLine));
To copy to clipboard, switch view to plain text mode
Edit Line 76 of plot.ccp:
d_curve2
->setPen
(QPen(Qt
::cyan));
d_curve2->setPen(QPen(Qt::cyan));
To copy to clipboard, switch view to plain text mode
change it to:
d_curve2
->setPen
(QPen(Qt
::cyan,
2, Qt
::DashLine));
d_curve2->setPen(QPen(Qt::cyan, 2, Qt::DashLine));
To copy to clipboard, switch view to plain text mode
when short version is used, linetype is set to default value Qt::SolidLine ,
but Qt::SolidLine also changes the color to black (when passed to a printer)
If you don't like a dashline, create your own solid line:
QVector<qreal> dashes;
qreal space = 4;
dashes <<100 << space << 100; //or however you want
pen.setDashPattern(dashes);
QPen pen;
QVector<qreal> dashes;
qreal space = 4;
dashes <<100 << space << 100; //or however you want
pen.setDashPattern(dashes);
To copy to clipboard, switch view to plain text mode
and replace Qt:ashLine with Qt::CustomDashLine in those two lines...
Bookmarks