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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user