commit bf1c1c2a11d9ca91bcda2a826d44d9e251da0692
parent 43583c1e28b17de9d2818faad97742b8b8dc3cc9
Author: SomberNight <somber.night@protonmail.com>
Date: Mon, 4 Mar 2019 04:24:45 +0100
qt qrcodewidget: on MacOS, was grabbing whole screen
from Electron-Cash/Electron-Cash@61d46989e6976bc0bf5070db99ad771dc8e27cce
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/electrum/gui/qt/qrcodewidget.py b/electrum/gui/qt/qrcodewidget.py
@@ -89,7 +89,6 @@ class QRDialog(WindowModalDialog):
vbox = QVBoxLayout()
qrw = QRCodeWidget(data)
- qscreen = QApplication.primaryScreen()
vbox.addWidget(qrw, 1)
if show_text:
text = QTextEdit()
@@ -104,12 +103,12 @@ class QRDialog(WindowModalDialog):
filename = os.path.join(config.path, "qrcode.png")
def print_qr():
- p = qscreen.grabWindow(qrw.winId())
+ p = qrw.grab() # FIXME also grabs neutral colored padding
p.save(filename, 'png')
self.show_message(_("QR code saved to file") + " " + filename)
def copy_to_clipboard():
- p = qscreen.grabWindow(qrw.winId())
+ p = qrw.grab()
QApplication.clipboard().setPixmap(p)
self.show_message(_("QR code copied to clipboard"))