FelixB
16th June 2011, 09:24
Hi,
I have some trouble printing a curve (on a real printer or into a pdf) with correct color and width. The on-screen-view is fine and so is the print preview too. I reproduced the problem with the bode example (win7, Qwt 5.2.1):
when I print the example "as it is", the yellow line is printed black. I can make it printing the correct color by changing
d_crv1->setPen(QPen(Qt::yellow)); into
d_crv1->setPen(QPen(Qt::yellow,1));. The same applies to all pens: there must be an explicit width set to print the color.
but I can't change the width. changing the line into
d_crv1->setPen(QPen(Qt::yellow,10)); makes the line thicker on screen (and also in print preview), but not in the printed result.
does anyone know whats wrong? Am I missing something?
thanks!
Felix
PS: the bode example does not have a print preview. I tested the preview-behaviour with my own project.
I have some trouble printing a curve (on a real printer or into a pdf) with correct color and width. The on-screen-view is fine and so is the print preview too. I reproduced the problem with the bode example (win7, Qwt 5.2.1):
when I print the example "as it is", the yellow line is printed black. I can make it printing the correct color by changing
d_crv1->setPen(QPen(Qt::yellow)); into
d_crv1->setPen(QPen(Qt::yellow,1));. The same applies to all pens: there must be an explicit width set to print the color.
but I can't change the width. changing the line into
d_crv1->setPen(QPen(Qt::yellow,10)); makes the line thicker on screen (and also in print preview), but not in the printed result.
does anyone know whats wrong? Am I missing something?
thanks!
Felix
PS: the bode example does not have a print preview. I tested the preview-behaviour with my own project.