Skip to content

Commit

Permalink
Qt UI: fix menu bar on MacOS
Browse files Browse the repository at this point in the history
MacOS requires a 'global' menubar to be available (e.g. QtMenuBar(nullptr)).
  • Loading branch information
twvd committed Dec 6, 2024
1 parent 8940d78 commit 3490e0a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/panda_qt/main_window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 3490e0a

Please sign in to comment.