39 lines
928 B
C++
39 lines
928 B
C++
#include <QQuickStyle>
|
|
#include <QStandardPaths>
|
|
#include <QtNetwork>
|
|
#include <QQmlApplicationEngine>
|
|
#include <QFile>
|
|
#include <QDesktopServices>
|
|
|
|
#include <QtCore/QUrl>
|
|
#include <QtCore/QCommandLineOption>
|
|
#include <QtCore/QCommandLineParser>
|
|
#include <QGuiApplication>
|
|
#include <QStyleHints>
|
|
#include <QScreen>
|
|
#include <QQmlApplicationEngine>
|
|
#include <QtQml/QQmlContext>
|
|
|
|
#include "appsettings.h"
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
AppSettings * pAppSettings = new AppSettings();
|
|
|
|
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
|
|
|
|
QGuiApplication app(argc, argv);
|
|
|
|
QQuickStyle::setStyle("Material");
|
|
|
|
QQmlApplicationEngine engine;
|
|
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
|
|
|
|
QQmlContext *context = engine.rootContext();
|
|
context->setContextProperty("_cppAppSettings", pAppSettings);
|
|
|
|
if (engine.rootObjects().isEmpty())
|
|
return -1;
|
|
|
|
return app.exec();
|
|
}
|