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)
This commit is contained in:
SomberNight 2020-06-07 03:10:27 +02:00
parent 211118ae81
commit d0ab003978
No known key found for this signature in database
GPG key ID: B33B5F232C6271E9

View file

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