Browse Source

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)
bip39-recovery
SomberNight 5 years ago
parent
commit
d0ab003978
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 3
      electrum/gui/qt/qrcodewidget.py

3
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()

Loading…
Cancel
Save