mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Make the cancel button the default button
This commit is contained in:
parent
91e51f8a10
commit
25ff57ad23
|
@ -10,7 +10,9 @@ RemoveFriendDialog::RemoveFriendDialog(QWidget *parent, const Friend *f)
|
|||
ui.setupUi(this);
|
||||
ui.label->setText(ui.label->text().replace("<name>", f->getDisplayedName()));
|
||||
auto removeButton = ui.buttonBox->button(QDialogButtonBox::Ok);
|
||||
auto cancelButton = ui.buttonBox->button(QDialogButtonBox::Cancel);
|
||||
removeButton->setText(tr("Remove"));
|
||||
cancelButton->setDefault(true);
|
||||
adjustSize();
|
||||
connect(ui.buttonBox, &QDialogButtonBox::accepted, this, &RemoveFriendDialog::onAccepted);
|
||||
connect(ui.buttonBox, &QDialogButtonBox::rejected, this, &RemoveFriendDialog::close);
|
||||
|
|
Loading…
Reference in New Issue
Block a user