1
0

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)
This commit is contained in:
SomberNight
2019-12-10 23:01:01 +01:00
parent 9d0ae2f95b
commit d08ed6410a

View File

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