From 2ea78f7f3b233cfcd85742e746c61d53d3254cfe Mon Sep 17 00:00:00 2001 From: SomberNight Date: Sat, 23 Sep 2017 22:16:36 +0200 Subject: [PATCH] fix qr code saving --- gui/qt/qrcodewidget.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gui/qt/qrcodewidget.py b/gui/qt/qrcodewidget.py index 7fcacc2d0..9fdb68774 100644 --- a/gui/qt/qrcodewidget.py +++ b/gui/qt/qrcodewidget.py @@ -97,6 +97,7 @@ class QRDialog(WindowModalDialog): vbox = QVBoxLayout() qrw = QRCodeWidget(data) + qscreen = QApplication.primaryScreen() vbox.addWidget(qrw, 1) if show_text: text = QTextEdit() @@ -111,12 +112,12 @@ class QRDialog(WindowModalDialog): filename = os.path.join(config.path, "qrcode.png") def print_qr(): - p = QScreen.grabWindow(qrw.winId()) + p = qscreen.grabWindow(qrw.winId()) p.save(filename, 'png') self.show_message(_("QR code saved to file") + " " + filename) def copy_to_clipboard(): - p = QScreen.grabWindow(qrw.winId()) + p = qscreen.grabWindow(qrw.winId()) p.save(filename, 'png') QApplication.clipboard().setImage(QImage(filename)) self.show_message(_("QR code copied to clipboard"))