From 3b44646bd1d448fc74a2a776ab9324c60c0b05ad Mon Sep 17 00:00:00 2001 From: ThomasV Date: Mon, 23 May 2022 10:11:35 +0200 Subject: [PATCH] QRCodeWidget: show warning in GUI --- electrum/gui/qt/qrcodewidget.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/electrum/gui/qt/qrcodewidget.py b/electrum/gui/qt/qrcodewidget.py index 8db21dcdf..d59a69110 100644 --- a/electrum/gui/qt/qrcodewidget.py +++ b/electrum/gui/qt/qrcodewidget.py @@ -73,7 +73,10 @@ class QRCodeWidget(QWidget): framesize = min(r.width(), r.height()) boxsize = int((framesize - 2*self.margin)/k) if boxsize < 2: - print('Warning: cannot draw qr code, boxsize too small') + qp.drawText(0, 20, 'Cannot draw QR code:') + qp.drawText(0, 40, 'Boxsize too small') + qp.end() + return size = k*boxsize left = (framesize - size)/2 top = (framesize - size)/2