-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
40 lines (35 loc) · 996 Bytes
/
main.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQuickWindow>
#include <QSurfaceFormat>
#include <QQmlContext>
#include <QDir>
#include <QtGlobal>
#include <QLoggingCategory>
#include <QStyleHints>
/**
* @brief main The main entry point for the application
* @param argc
* @param argv
* @return
*/
int main(int argc, char *argv[])
{
// App settings
const QString APP_NAME = "Drag Handler Reproduction";
const QString APP_VERSION = "1.0";
QGuiApplication::setApplicationName(APP_NAME);
QGuiApplication::setApplicationVersion(APP_VERSION);
// OpenGL
QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL);
// Inits
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
// Setups
engine.load(QUrl(QStringLiteral("qrc:/qml/main.qml")));
if (engine.rootObjects().isEmpty())
return -1;
// Cleanup
qInstallMessageHandler(0);
return app.exec();
}