From: Peter Nordin <peter.nordin@li...> - 2013-01-22 14:47:18
I am using Qwt 6.1.0-rc2 with Qt 4.8.2.
I am trying to export a plot in PDF or PS format using the
QwtPlotRenderer and the very convenient renderDocument function. However
my exported plots do not get any colors. (SVG and bitmaps works)
The default colorMode for QPrinter seems to be grayscale, but I can not
find any way of changing the colorMode setting through the
Is there a way to do this, or could such a feature be added ?
For now I have basically copied some of the code from inside the
renderDocument function and added the
printer->setColorMode(QPrinter::Color) call myself, but it would be nice
if this could be done through the QwtPlotRenderer class directly.
Thanks for a great lib!
On 01/22/2013 03:47 PM, Peter Nordin wrote:
> The default colorMode for QPrinter seems to be grayscale, ...
On mine it is colored - I'm not sure what it depends on.
But when using QwtPlotRenderer::renderDocument() it should always be
colored - I have added a line that explicitly sets this mode.