1
0
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:
agilob 2015-08-30 00:11:51 +01:00 committed by tux3
parent a97a91a7be
commit d6d5fd1c33

View File

@ -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);