-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.cpp
More file actions
30 lines (23 loc) · 776 Bytes
/
Copy pathmain.cpp
File metadata and controls
30 lines (23 loc) · 776 Bytes
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
#include <QApplication>
#include <QQmlApplicationEngine>
#include <QQuickWindow>
#include <QQmlContext>
#include <QtQml/QQmlEngine>
#include <qqml.h>
#include "capturer.h"
#include "library.h"
#include "launch.h"
#include "cfg.h"
#include "shader.h"
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
qmlRegisterType<Library>("Library", 1, 0, "Library");
qmlRegisterType<Launch>("Launch", 1, 0, "Launch");
qmlRegisterType<Config>("Config", 1, 0, "Config");
qmlRegisterType<Shader>("Shader", 1, 0, "Shader");
QQmlApplicationEngine engine(QUrl("src/qml/main.qml"));
QObject *topLevel = engine.rootObjects().value(0);
QQuickWindow *window = qobject_cast<QQuickWindow *>(topLevel);
window->show();
return app.exec();
}