Qt UI: fix menu bar on MacOS (#668)
MacOS requires a 'global' menubar to be available (e.g. QtMenuBar(nullptr)).
This commit is contained in:
@@ -31,8 +31,7 @@ MainWindow::MainWindow(QApplication* app, QWidget* parent) : QMainWindow(parent)
|
|||||||
appRunning = true;
|
appRunning = true;
|
||||||
|
|
||||||
// Set our menu bar up
|
// Set our menu bar up
|
||||||
menuBar = new QMenuBar(this);
|
menuBar = new QMenuBar(nullptr);
|
||||||
setMenuBar(menuBar);
|
|
||||||
|
|
||||||
// Create menu bar menus
|
// Create menu bar menus
|
||||||
auto fileMenu = menuBar->addMenu(tr("File"));
|
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"));
|
auto aboutAction = aboutMenu->addAction(tr("About Panda3DS"));
|
||||||
connect(aboutAction, &QAction::triggered, this, &MainWindow::showAboutMenu);
|
connect(aboutAction, &QAction::triggered, this, &MainWindow::showAboutMenu);
|
||||||
|
setMenuBar(menuBar);
|
||||||
|
|
||||||
emu->setOutputSize(screen->surfaceWidth, screen->surfaceHeight);
|
emu->setOutputSize(screen->surfaceWidth, screen->surfaceHeight);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user