From 30382e8a84ed591409c611a70ab8b735a7e08a91 Mon Sep 17 00:00:00 2001 From: RedDeadDepresso <94017243+RedDeadDepresso@users.noreply.github.com> Date: Tue, 8 Oct 2024 00:11:23 +0100 Subject: [PATCH] fix: pressing enter doesn't cancel in password messagebox --- app/components/password_dialog.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/components/password_dialog.py b/app/components/password_dialog.py index e40df0c..2e1b422 100644 --- a/app/components/password_dialog.py +++ b/app/components/password_dialog.py @@ -25,9 +25,11 @@ class PasswordDialog(Dialog): passwordLayout.addWidget(self.passwordLineEdit, 1, Qt.AlignTop) self.vBoxLayout.insertLayout(2, passwordLayout, 1) self.setTitleBar(FluentTitleBar(self)) + self.yesButton.setDefault(True) def __connectSignalToSlot(self): self.passwordLineEdit.textChanged.connect(self.onTextChanged) + self.passwordLineEdit.returnPressed.connect(self.yesSignal.emit) self.yesSignal.connect(self.onYesSignal) def onTextChanged(self, text: str):