From 41fef0ed8825093f68c37c5f633ec0cddd1cadc0 Mon Sep 17 00:00:00 2001 From: Le Tan Date: Sun, 11 Jun 2017 20:57:05 +0800 Subject: [PATCH] do not show icons in menu on macOS There is something wrong in the icon resource path on macOS. The icons in menu could not be displayed correctly. --- src/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index 8d866316..89174d8d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -106,6 +106,12 @@ int main(int argc, char *argv[]) QApplication app(argc, argv); vconfig.initialize(); +#if defined(Q_OS_MACOS) + // Do not show icons in menu on macOS since there is something wrong with + // the icon path on macOS. + app.setAttribute(Qt::AA_DontShowIconsInMenus); +#endif + QString locale = VUtils::getLocale(); qDebug() << "use locale" << locale;