mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
add quit role to quit action in trayicon
This commit is contained in:
parent
a97a91a7be
commit
d6d5fd1c33
|
@ -1699,6 +1699,7 @@ void Widget::onTryCreateTrayIcon()
|
|||
trayMenu = new QMenu(this);
|
||||
QStyle *style = qApp->style();
|
||||
actionQuit = new QAction(tr("&Exit"), this);
|
||||
actionQuit->setMenuRole(QAction::QuitRole);
|
||||
actionQuit->setShortcut(QKeySequence::Quit); // system default quit shorcut
|
||||
actionQuit->setIcon(style->standardIcon(QStyle::SP_DialogCloseButton)); // system default exit icon
|
||||
connect(actionQuit, &QAction::triggered, qApp, &QApplication::quit);
|
||||
|
|
Loading…
Reference in New Issue
Block a user