diff options
Diffstat (limited to 'src/widgets/widgets/qmenubar.cpp')
-rw-r--r-- | src/widgets/widgets/qmenubar.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/widgets/widgets/qmenubar.cpp b/src/widgets/widgets/qmenubar.cpp index ce43740524..6b0c2fd621 100644 --- a/src/widgets/widgets/qmenubar.cpp +++ b/src/widgets/widgets/qmenubar.cpp @@ -1192,6 +1192,10 @@ QPlatformMenu *QMenuBarPrivate::getPlatformMenu(QAction *action) QPlatformMenu *platformMenu = action->menu()->platformMenu(); if (!platformMenu && platformMenuBar) { platformMenu = platformMenuBar->createMenu(); + // QPlatformMenuBar::createMenu() was introduced in Qt 5.7. Not all third party + // platform themes are using it, so fallback to QPlatformTheme::createPlatformMenu(). + if (!platformMenu) + platformMenu = QGuiApplicationPrivate::platformTheme()->createPlatformMenu(); if (platformMenu) action->menu()->setPlatformMenu(platformMenu); } |