def print_(self, printer): from qwt.plot_renderer import QwtPlotRenderer renderer = QwtPlotRenderer(self) renderer.renderTo(self, printer)