blob: 26c823c16e3e818ec4c94ecc4cf5199169661c79 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
#include "mainwindow.h"
#include <QApplication>
#include <QCommandLineParser>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QCommandLineParser parser;
parser.setApplicationDescription("BigMenuCreator");
parser.addHelpOption();
parser.addOptions({
{ "new-menubar", QLatin1String("Use new menubar instead of QMainWindow's own.") },
{ "no-parent", QLatin1String("When using a new menubar, do *not* set its parent on construction.") }
});
parser.process(a);
MainWindow::newMenubar = parser.isSet("new-menubar");
MainWindow::parentlessMenubar = parser.isSet("no-parent");
MainWindow w;
w.show();
return a.exec();
}
|