mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-21 05:43:32 -07:00
Set 'Cancel' as the default button in the shutdown confirmation dialog.
This commit is contained in:
parent
ac166a89ae
commit
5cb04f9b31
1 changed files with 2 additions and 0 deletions
|
@ -52,6 +52,8 @@ ShutdownConfirmDlg::ShutdownConfirmDlg(const shutDownAction &action): exit_now(N
|
||||||
setIcon(QMessageBox::Warning);
|
setIcon(QMessageBox::Warning);
|
||||||
// Always on top
|
// Always on top
|
||||||
setWindowFlags(windowFlags()|Qt::WindowStaysOnTopHint);
|
setWindowFlags(windowFlags()|Qt::WindowStaysOnTopHint);
|
||||||
|
// Set 'Cancel' as default button.
|
||||||
|
setDefaultButton(QMessageBox::Cancel);
|
||||||
timer.setInterval(1000); // 1sec
|
timer.setInterval(1000); // 1sec
|
||||||
connect(&timer, SIGNAL(timeout()), this, SLOT(updateSeconds()));
|
connect(&timer, SIGNAL(timeout()), this, SLOT(updateSeconds()));
|
||||||
show();
|
show();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue