2019-07-08 13:52:41 +10:00
|
|
|
// Copyright 2019 miruka
|
|
|
|
// This file is part of harmonyqml, licensed under LGPLv3.
|
|
|
|
|
2019-07-16 06:14:08 +10:00
|
|
|
#include <QApplication>
|
2019-07-03 03:59:52 +10:00
|
|
|
#include <QQmlEngine>
|
|
|
|
#include <QQmlContext>
|
|
|
|
#include <QQmlComponent>
|
|
|
|
#include <QFileInfo>
|
|
|
|
#include <QUrl>
|
|
|
|
|
|
|
|
|
|
|
|
int main(int argc, char *argv[]) {
|
2019-07-16 06:14:08 +10:00
|
|
|
QApplication app(argc, argv);
|
2019-07-03 03:59:52 +10:00
|
|
|
|
|
|
|
QQmlEngine engine;
|
|
|
|
QQmlContext *objectContext = new QQmlContext(engine.rootContext());
|
|
|
|
|
|
|
|
QQmlComponent component(
|
|
|
|
&engine,
|
|
|
|
QFileInfo::exists("qrc:/qml/Window.qml") ?
|
|
|
|
"qrc:/qml/Window.qml" : "src/qml/Window.qml"
|
|
|
|
);
|
|
|
|
component.create(objectContext);
|
|
|
|
|
|
|
|
return app.exec();
|
|
|
|
}
|