From 1d2429c3ea9fffcd625c0de215f83562aa886fc2 Mon Sep 17 00:00:00 2001 From: Thomas Date: Fri, 6 Dec 2024 19:04:00 +0100 Subject: [PATCH] Qt UI: fix menu bar on MacOS (#668) MacOS requires a 'global' menubar to be available (e.g. QtMenuBar(nullptr)). --- src/panda_qt/main_window.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/panda_qt/main_window.cpp b/src/panda_qt/main_window.cpp index c4d536975..c30d23ca2 100644 --- a/src/panda_qt/main_window.cpp +++ b/src/panda_qt/main_window.cpp @@ -31,8 +31,7 @@ MainWindow::MainWindow(QApplication* app, QWidget* parent) : QMainWindow(parent) appRunning = true; // Set our menu bar up - menuBar = new QMenuBar(this); - setMenuBar(menuBar); + menuBar = new QMenuBar(nullptr); // Create menu bar menus auto fileMenu = menuBar->addMenu(tr("File")); @@ -77,6 +76,7 @@ MainWindow::MainWindow(QApplication* app, QWidget* parent) : QMainWindow(parent) auto aboutAction = aboutMenu->addAction(tr("About Panda3DS")); connect(aboutAction, &QAction::triggered, this, &MainWindow::showAboutMenu); + setMenuBar(menuBar); emu->setOutputSize(screen->surfaceWidth, screen->surfaceHeight);