SIEdit/app/main.cpp
2022-06-27 09:44:50 -07:00

24 lines
535 B
C++

#include "mainwindow.h"
#include <QApplication>
#include <QCommandLineParser>
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
MainWindow w;
QCommandLineParser parser;
parser.addPositionalArgument(QCoreApplication::translate("main", "file"),
QCoreApplication::translate("main", "The file to open on startup."));
parser.process(a);
if (!parser.positionalArguments().empty()) {
w.OpenFilename(parser.positionalArguments().first());
}
w.show();
return a.exec();
}