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:
@@ -85,7 +85,8 @@ class QRCodeWidget(QWidget):
|
|||||||
for r in range(k):
|
for r in range(k):
|
||||||
for c in range(k):
|
for c in range(k):
|
||||||
if matrix[r][c]:
|
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()
|
qp.end()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user