From f02c93c8c884f108ff97a27bfb9c068bd41aedc9 Mon Sep 17 00:00:00 2001 From: Filippo Scognamiglio Date: Thu, 8 Jan 2026 22:54:28 +0100 Subject: [PATCH] Add macos new window menu. --- app/main.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/main.cpp b/app/main.cpp index e615e4d..d6783eb 100644 --- a/app/main.cpp +++ b/app/main.cpp @@ -22,6 +22,7 @@ #if defined(Q_OS_MAC) #include #include +#include #endif QString getNamedArgument(QStringList args, QString name, QString defaultName) @@ -157,5 +158,11 @@ int main(int argc, char *argv[]) requestNewWindow(); }); +#if defined(Q_OS_MAC) + QMenu *dockMenu = new QMenu(nullptr); + dockMenu->addAction(QObject::tr("New Window"), [&requestNewWindow]() { requestNewWindow(); }); + dockMenu->setAsDockMenu(); +#endif + return app.exec(); }