1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-09-18 16:32:33 +02:00
ScreenPlay/ScreenPlayWidget/SPWidgetmain.cpp
2018-12-01 18:01:17 +01:00

30 lines
811 B
C++

#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QStringList>
#include "src/spwidgetmainwindow.h"
#include "../ScreenPlaySDK/screenplaysdk.h"
int main(int argc, char* argv[])
{
QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
ScreenPlaySDK sdk;
QGuiApplication app(argc, argv);
QStringList argumentList = app.arguments();
if (argumentList.length() != 3) {
return -3;
}
SPWidgetmainwindow spwmw(argumentList.at(1), argumentList.at(2));
//SPWidgetmainwindow spwmw("D:/672870/xkcd","asasasasd" );
QObject::connect(&sdk, &ScreenPlaySDK::sdkDisconnected, &spwmw, &SPWidgetmainwindow::destroyThis);
QObject::connect(&sdk, &ScreenPlaySDK::incommingMessage, &spwmw, &SPWidgetmainwindow::messageReceived);
return app.exec();
}