-
Notifications
You must be signed in to change notification settings - Fork 0
/
Main.cpp
32 lines (24 loc) · 966 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
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include <QQuickWindow>
#include <QFontDatabase>
#include "JuceHeader.h"
#include "Metronome.h"
int main (int argc, char* argv[])
{
QCoreApplication::setOrganizationName ("witte");
QCoreApplication::setOrganizationDomain ("witte.github.io");
QCoreApplication::setApplicationName (ProjectInfo::projectName);
QCoreApplication::setApplicationVersion (ProjectInfo::versionString);
QCoreApplication::setAttribute (Qt::AA_EnableHighDpiScaling);
QGuiApplication app (argc, argv);
QQmlApplicationEngine qmlEngine;
QFontDatabase::addApplicationFont(":/OpenSansCondensed-Light.ttf");
app.setFont({"Open Sans Condensed Light"});
Metronome metronome;
qmlEngine.rootContext()->setContextProperty ("metronome", &metronome);
qmlEngine.load("qrc:/Main.qml");
if (qmlEngine.rootObjects().isEmpty()) return -1;
return app.exec();
}