Browse Source

python3.8: fix DeprecationWarning in qt/paytoedit

.../electrum/electrum/gui/qt/paytoedit.py:221: 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.
  self.setMinimumHeight(h)
hard-fail-on-bad-server-string
SomberNight 5 years ago
parent
commit
d08ed6410a
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 2
      electrum/gui/qt/paytoedit.py

2
electrum/gui/qt/paytoedit.py

@ -216,7 +216,7 @@ class PayToEdit(CompletionTextEdit, ScanQRTextEdit, Logger):
def update_size(self):
lineHeight = QFontMetrics(self.document().defaultFont()).height()
docHeight = self.document().size().height()
h = docHeight * lineHeight + 11
h = round(docHeight * lineHeight + 11)
h = min(max(h, self.heightMin), self.heightMax)
self.setMinimumHeight(h)
self.setMaximumHeight(h)

Loading…
Cancel
Save