#include "pylonrecorder.h" #include #include #include int main(int argc, char *argv[]) { QApplication app(argc, argv); QGuiApplication::setApplicationDisplayName(PylonRecorder::tr("Image Viewer")); QCommandLineParser commandLineParser; commandLineParser.addHelpOption(); commandLineParser.addPositionalArgument(PylonRecorder::tr("[file]"), PylonRecorder::tr("Image file to open.")); commandLineParser.process(QCoreApplication::arguments()); PylonRecorder imageViewer; if (!commandLineParser.positionalArguments().isEmpty() && !imageViewer.loadFile(commandLineParser.positionalArguments().front())) { return -1; } imageViewer.show(); int ret = app.exec(); return ret; }