fix: pressing enter doesn't cancel in password messagebox

This commit is contained in:
RedDeadDepresso
2024-10-08 00:11:23 +01:00
parent d7cfeb7f64
commit 30382e8a84

View File

@@ -25,9 +25,11 @@ class PasswordDialog(Dialog):
passwordLayout.addWidget(self.passwordLineEdit, 1, Qt.AlignTop) passwordLayout.addWidget(self.passwordLineEdit, 1, Qt.AlignTop)
self.vBoxLayout.insertLayout(2, passwordLayout, 1) self.vBoxLayout.insertLayout(2, passwordLayout, 1)
self.setTitleBar(FluentTitleBar(self)) self.setTitleBar(FluentTitleBar(self))
self.yesButton.setDefault(True)
def __connectSignalToSlot(self): def __connectSignalToSlot(self):
self.passwordLineEdit.textChanged.connect(self.onTextChanged) self.passwordLineEdit.textChanged.connect(self.onTextChanged)
self.passwordLineEdit.returnPressed.connect(self.yesSignal.emit)
self.yesSignal.connect(self.onYesSignal) self.yesSignal.connect(self.onYesSignal)
def onTextChanged(self, text: str): def onTextChanged(self, text: str):