def on_click(self): svg = QSvgWidget() svg.renderer().load(self.trace()) svg.setWindowTitle("SVG Picture") svg.show()