From 95804d618f3ce3df189fb79bbff05e12a1e06ba8 Mon Sep 17 00:00:00 2001 From: Krad Date: Tue, 8 Mar 2022 10:12:12 +0800 Subject: [PATCH] Fix Account Dialog stuck, when change pwd dialog show and click the Account Dialog. --- src/AccountFormDialog.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/AccountFormDialog.cpp b/src/AccountFormDialog.cpp index 2529c41..5f69143 100644 --- a/src/AccountFormDialog.cpp +++ b/src/AccountFormDialog.cpp @@ -131,13 +131,16 @@ AccountFormDialog::AccountFormDialog(QWidget* parent, AccountEditMode mode, Qt:: layout->addWidget(lbl_endline9); if (m_mode == Self) { connect(btn_Pwd, &QPushButton::clicked, [=]() { - ChangePasswordFormDialog dia(this->parentWidget()); + ChangePasswordFormDialog dia(this); + dia.setGeometry(this->geometry()); dia.setWindowModality(Qt::WindowModal); dia.exec(); + }); } else { connect(btn_Pwd, &QAbstractButton::clicked, [=]() { AlertDialog dialog(this); + dialog.setGeometry(this->geometry()); dialog.setButtonMode(OkAndCancel); dialog.setWindowModality(Qt::WindowModal); dialog.setAlertMessage(tr("Reset password to \"123456\" ?"));