Browse Source

qt gui: follow-up qt6: fix args for QWidget.setFocus()

Traceback (most recent call last):
  File "...\electrum\electrum\gui\qt\main_window.py", line 1797, in toggle_search
    self.search_box.setFocus(1)
TypeError: arguments did not match any overloaded call:
  setFocus(self): too many arguments
  setFocus(self, reason: Qt.FocusReason): argument 1 has unexpected type 'int'
master
SomberNight 1 year ago
parent
commit
383f99796a
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
  1. 2
      electrum/gui/qt/main_window.py
  2. 2
      electrum/plugins/ledger/auth2fa.py
  3. 2
      electrum/plugins/trustedcoin/qt.py

2
electrum/gui/qt/main_window.py

@ -1794,7 +1794,7 @@ class ElectrumWindow(QMainWindow, MessageBoxMixin, Logger, QtEventListener):
def toggle_search(self):
self.search_box.setHidden(not self.search_box.isHidden())
if not self.search_box.isHidden():
self.search_box.setFocus(1)
self.search_box.setFocus()
else:
self.do_search('')

2
electrum/plugins/ledger/auth2fa.py

@ -155,7 +155,7 @@ class LedgerAuthDialog(QDialog):
self.helpmsg.setVisible(True)
self.pinbox.setVisible(self.cfg['mode'] == 0)
self.cardbox.setVisible(self.cfg['mode'] == 1)
self.pintxt.setFocus(True) if self.cfg['mode'] == 0 else self.cardtxt.setFocus(True)
self.pintxt.setFocus() if self.cfg['mode'] == 0 else self.cardtxt.setFocus()
self.setMaximumHeight(400)
def getDevice2FAMode(self):

2
electrum/plugins/trustedcoin/qt.py

@ -449,7 +449,7 @@ class WCShowConfirmOTP(WizardComponent):
hbox.addStretch(1)
hbox.addWidget(self.spinner_l)
self.otp_e = AmountEdit(None, is_int=True)
self.otp_e.setFocus(True)
self.otp_e.setFocus()
self.otp_e.setMaximumWidth(150)
self.otp_e.textEdited.connect(self.on_otp_edited)
hbox.addWidget(self.otp_e)

Loading…
Cancel
Save