I am using QPainter to draw some graphs on the screen and save these graphs as a raster images.
Is it possible to use the same logic I used for rasterizing these graphs to have them exported to vector images that I can 开发者_运维问答use in a PDF?
You can use a QSvgGenerator
as a "backend" to your QPainter
, and you'll get an SVG document out of it. (The documentation has an example for how to do that.)
I don't know if you can use that directly in PDFs, but there are converters out there if you need a different vector graphics format.
精彩评论