29 Apr 23:34
Qt::QPainter and Qt::QPrinter create pdf export of text AOK.
From: Peter Leopold <Peter.Leopold <at> BioAnalyte.com>
Subject: Qt::QPainter and Qt::QPrinter create pdf export of text AOK.
Newsgroups: gmane.comp.graphics.qwt.general
Date: 2008-04-29 21:34:53 GMT
Subject: Qt::QPainter and Qt::QPrinter create pdf export of text AOK.
Newsgroups: gmane.comp.graphics.qwt.general
Date: 2008-04-29 21:34:53 GMT
> Please continue with the label demo.
> Uwe
>
Thanks to Uwe's suggestions (and his patience) I am now using Qt 4.3.4
and a freshly recompiled qwt-5.0.2 in Kubuntu:
A QPainter/QPrinter version of the hello world label demo works fine,
both on the screen and in the pdf. I'll spare the details. Not a qt problem.
Can anyone get the bode example to work (with valid pdf output) when
d_mrk1->setLineStyle(QwtPlotMarker::VLine);
is changed to
d_mrk1->setLineStyle(QwtPlotMarker::NoLine);
??
If you *can't* get it to work, then that says something, and I'm not as
alone as I think I am.
My next steps: painting on QwtPlots directly. QPainter::begin() keeps
reminding me that "Widget painting can only begin as a result of a
paintEvent" so to get this to work I'll have to extend QwtPlot:
class MyPaintablePlot : public QwtPlot {
MyPaintablePlot : QwtPlot (){}
void paintEvent(QPaintEvent *ev){
etc.
}
};
This will allow me to use the same paint methods, e.g.,
QPainter::drawText(QRect r, QString label), that actually work.
On the other hand, since this doesn't exist already, there is probably a
good reason for it. Comments? Advice?
Peter
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
RSS Feed