mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-31 01:11:35 +00:00
qt qrcodewidget: on MacOS, was grabbing whole screen
from Electron-Cash/Electron-Cash@61d46989e6
This commit is contained in:
parent
43583c1e28
commit
bf1c1c2a11
1 changed files with 2 additions and 3 deletions
|
@ -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"))
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue