Has anyone here ever worked with QPrinter or QPdfWriter? I'm totally confused with all this QPainter stuff. All I want to do is to convert an SVG to PDF. I'm using SvgRenderer, which creates a Painter. But I don't know where to go from there. My small piece of code:
def convert(self):
file = "/home/ricardo/Imagens/desenho.svg"
svg = QSvgRenderer()
out = svg.load(file)
printer = QPrinter(out) # Am I mad? I suppose "out" is a QPainter.
printer.setOutputFormat(QPrinter.PdfFormat)
printer.setOutputFileName("/home/ricardo/Imagens/file.pdf") # I don't know what to do from here