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'
This commit is contained in:
@@ -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('')
|
||||
|
||||
|
||||
@@ -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):
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user