Skip to content

Commit

Permalink
Qt UI: fix menu bar on MacOS (#668)
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 authored Dec 6, 2024
1 parent 4606be0 commit 1d2429c
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 1d2429c

Please sign in to comment.