From d0ab0039784d1d0faade548182f72aa6d47b7e82 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Sun, 7 Jun 2020 03:10:27 +0200 Subject: [PATCH] qt qrcode: fix DeprecationWarning (float->int conversion) ...\electrum\electrum\gui\qt\qrcodewidget.py:88: DeprecationWarning: an integer is required (got type float). Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python. qp.drawRect(left+c*boxsize, top+r*boxsize, boxsize - 1, boxsize - 1) --- electrum/gui/qt/qrcodewidget.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/electrum/gui/qt/qrcodewidget.py b/electrum/gui/qt/qrcodewidget.py index c8f84934b..7f1959fa7 100644 --- a/electrum/gui/qt/qrcodewidget.py +++ b/electrum/gui/qt/qrcodewidget.py @@ -85,7 +85,8 @@ class QRCodeWidget(QWidget): for r in range(k): for c in range(k): if matrix[r][c]: - qp.drawRect(left+c*boxsize, top+r*boxsize, boxsize - 1, boxsize - 1) + qp.drawRect(int(left+c*boxsize), int(top+r*boxsize), + boxsize - 1, boxsize - 1) qp.end()