QtHPConnect/main.cpp

31 lines
822 B
C++
Raw Normal View History

2019-02-10 15:43:00 +02:00
#include "mainwindow.h"
#include <QApplication>
#include <QCommandLineParser>
#include <QCommandLineOption>
2019-02-10 15:32:15 +02:00
2019-02-10 15:43:00 +02:00
int main(int argc, char *argv[])
2019-02-10 15:32:15 +02:00
{
2019-02-10 15:43:00 +02:00
Q_INIT_RESOURCE(qthpconnect);
2019-02-10 15:32:15 +02:00
2019-02-10 15:43:00 +02:00
QApplication a(argc, argv);
2019-02-18 22:15:04 +02:00
QCoreApplication::setOrganizationName("");
QCoreApplication::setApplicationName("Linux QtHP Connect");
QCoreApplication::setApplicationVersion(HP_VERSION_STRING);
2019-02-10 15:43:00 +02:00
QCommandLineParser parser;
2019-02-18 22:15:04 +02:00
parser.setApplicationDescription(QCoreApplication::applicationName());
2019-02-10 15:43:00 +02:00
//REWORK
parser.addHelpOption();
parser.addVersionOption();
2019-02-18 22:15:04 +02:00
// parser.addPositionalArgument("file", "The file to open.");
2019-02-10 15:43:00 +02:00
parser.process(a);
MainWindow w;
// if (!parser.positionalArguments().isEmpty())
// w.loadFile(parser.positionalArguments().first());
w.show();
return a.exec();
2019-02-10 15:32:15 +02:00
}