Browse Source

(trivial) qt locktimeedit: fix a DeprecationWarning

/home/user/wspace/electrum/electrum/gui/qt/locktimeedit.py:145: DeprecationWarning: an integer is required (got type Alignment).  Implicit conversion to integers using __int__ is deprecated, and may be removed in a future version of Python.
  painter.drawText(textRect, Qt.AlignRight | Qt.AlignVCenter, "height")
patch-4
SomberNight 3 years ago
parent
commit
3535eef8f8
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 2
      electrum/gui/qt/locktimeedit.py

2
electrum/gui/qt/locktimeedit.py

@ -142,7 +142,7 @@ class LockTimeHeightEdit(LockTimeRawEdit):
textRect.adjust(2, 0, -10, 0)
painter = QPainter(self)
painter.setPen(ColorScheme.GRAY.as_color())
painter.drawText(textRect, Qt.AlignRight | Qt.AlignVCenter, "height")
painter.drawText(textRect, int(Qt.AlignRight | Qt.AlignVCenter), "height")
def get_max_allowed_timestamp() -> int:

Loading…
Cancel
Save