diff --git a/src/widget/widget.cpp b/src/widget/widget.cpp index 1ffb80af6..d3c576298 100644 --- a/src/widget/widget.cpp +++ b/src/widget/widget.cpp @@ -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);