def snapshot(self): """ Take a snapshot of the window and close it. """ widget = self.view.proxy.widget framesize = widget.window().frameSize() QPixmap.grabWindow(QApplication.desktop().winId(), widget.x(), widget.y(), framesize.width(), framesize.height() ).save(self.path) widget.close()
def snapshot(self): """ Take a snapshot of the window and close it. """ widget = self.view.proxy.widget framesize = widget.window().frameSize() QPixmap.grabWindow(QApplication.desktop().winId(), widget.x(), widget.y(), framesize.width(), framesize.height()).save(self.path) widget.close()