NiirsCpp/NiirsLinux/main.cpp

29 lines
589 B
C++
Raw Normal View History

2023-02-22 11:56:10 +08:00
#include "niirs.h"
#include <QtWidgets/QApplication>
#include <QStyleFactory>
#include <QStyle>
int main(int argc, char *argv[])
{
QString xmlInterface = "";
for (int i = 0; i < argc; i++)
{
QString temp = QString::fromLocal8Bit(argv[i]);
if (temp == "--xml" && i + 1 < argc)
{
xmlInterface = argv[i + 1];
break;
}
}
QApplication a(argc, argv);
QStyle* style = QStyleFactory::create("Fusion");
a.setStyle(style);
NIIRS w;
w.setXmlInterface(xmlInterface);
w.show();
return a.exec();
}