#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "headers/serverconn.h" #include "headers/appsettings.h" int main(int argc, char *argv[]) { ServerConn * pServerConn = new ServerConn; AppSettings * pAppSettings = new AppSettings(); pGlobalAppSettings = pAppSettings; QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); //! [0] QGuiApplication app(argc, argv); QtWebView::initialize(); //! [0] QQuickStyle::setStyle("Material"); QQmlApplicationEngine engine; engine.load(QUrl(QStringLiteral("qrc:/main.qml"))); QQmlContext *context = engine.rootContext(); context->setContextProperty("_cppServerConn", pServerConn); context->setContextProperty("_cppAppSettings", pAppSettings); if (engine.rootObjects().isEmpty()) return -1; int ret; ret = app.exec(); delete pServerConn; delete pAppSettings; return(ret); }