Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
main.cpp
Go to the documentation of this file.
1// Copyright (C) 2018 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4#include "mainwindow.h"
5
6#include <QApplication>
7#include <QCommandLineParser>
8
10
11int main(int argc, char **argv)
12{
13 QApplication app(argc, argv);
14 app.setOrganizationName(QStringLiteral("QtProject"));
15 app.setApplicationName(QStringLiteral("Qt Distance Field Generator"));
16 app.setApplicationVersion(QStringLiteral(QT_VERSION_STR));
17
18 QCommandLineParser parser;
19 parser.setApplicationDescription(
20 QCoreApplication::translate("main",
21 "Allows to prepare a font cache for Qt applications."));
22 parser.addHelpOption();
23 parser.addVersionOption();
24 parser.addPositionalArgument(QLatin1String("file"),
25 QCoreApplication::translate("main",
26 "Font file (*.ttf, *.otf)"));
27 parser.process(app);
28
29 MainWindow mainWindow;
30 if (!parser.positionalArguments().isEmpty())
31 mainWindow.open(parser.positionalArguments().constFirst());
32 mainWindow.show();
33
34 return app.exec();
35}
int main(int argc, char *argv[])
[2]
Definition buffer.cpp:77