export QR code to clipboard (fixes issue #318)
This commit is contained in:
parent
554d8dd3b7
commit
28a31b65ee
|
@ -1581,11 +1581,21 @@ class ElectrumWindow(QMainWindow):
|
|||
hbox = QHBoxLayout()
|
||||
hbox.addStretch(1)
|
||||
|
||||
def print_qr(self):
|
||||
filename = "qrcode.bmp"
|
||||
filename = os.path.join(self.config.path, "qrcode.bmp")
|
||||
|
||||
def print_qr():
|
||||
bmp.save_qrcode(qrw.qr, filename)
|
||||
QMessageBox.information(None, _('Message'), _("QR code saved to file") + " " + filename, _('OK'))
|
||||
|
||||
def copy_to_clipboard():
|
||||
bmp.save_qrcode(qrw.qr, filename)
|
||||
self.app.clipboard().setImage(QImage(filename))
|
||||
QMessageBox.information(None, _('Message'), _("QR code saved to clipboard"), _('OK'))
|
||||
|
||||
b = QPushButton(_("Copy"))
|
||||
hbox.addWidget(b)
|
||||
b.clicked.connect(copy_to_clipboard)
|
||||
|
||||
b = QPushButton(_("Save"))
|
||||
hbox.addWidget(b)
|
||||
b.clicked.connect(print_qr)
|
||||
|
|
Loading…
Reference in New Issue