Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Printing compound widget as vector graphic postscript
jcbikeski last edited by
I want to effectively do what QWidget->render does but I don't want it to first paint pixel graphics but rather directly paint vector graphics. Is there some flag or such or do I need to write my own recursive render routine? When I tried writing to PDF or postscript I found it painted first to a pixmap then the render routine inserted that raster/pixel image into the output. Since PDF and postscript can accept scalable vector graphics I hoped all my painter->drawXXXXX routines would result in vector graphics which would then scale well when my end users include these into other documents.
Thanks for any ideas!
ZapB last edited by
But widgets and the styles they use are inherently raster based beasts (or at least many of the elements they use are). I am unsure of a way to get a completely vector-based format output that does not include rasterised elements.
giesbert last edited by
Afaik, Qt has no vector based paint engine. But you could write one and use that one instead of the pixel based (raster based) one.
Eddy last edited by
QGraphicsView, QGraphicsScene and QGraphicsViewItems could be used vector based. You can even use widgets in it, but those will remain raster based as ZapB mentioned.
It uses QPrinter for output. You could check the pdf output possibilities first.