Re: Qt::QPainter and Qt::QPrinter create pdf export of text AOK.
Brought to you by:
rathmann
|
From: Uwe R. <Uwe...@ti...> - 2008-04-30 05:13:54
|
On Tuesday 29 April 2008 23:34, Peter Leopold wrote: > 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. Please let's continue with your label demo. It works fine here ( after adding the replot ), but not on your box. On the other side you can print with QPainter::drawText. So there is something in between, what makes the difference. So the next step is to strip down the label example: 1) Hide the axes ( so there is nothing else painted than the marker ) 2) Change QwtPlotMarker::draw and replace "d_data->label.draw(p, tr);" by your working QPainter::drawText(). Please try QPainter::drawText(tr, ...) and QPainter::drawText(tr.topLeft(), ...). Uwe PS: By the way: if you add a title with the same font. Is it printed ? |