mirror of
https://github.com/Swordfish90/cool-retro-term.git
synced 2025-11-01 15:42:12 +00:00
Refactoring of build system and use of native executable instead of qmlscene.
This commit is contained in:
27
app/main.cpp
Normal file
27
app/main.cpp
Normal file
@@ -0,0 +1,27 @@
|
||||
#include <QtQml/QQmlApplicationEngine>
|
||||
#include <QtGui/QGuiApplication>
|
||||
|
||||
#include <QtWidgets/QApplication>
|
||||
|
||||
#include <QDebug>
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
setenv("QT_QPA_PLATFORMTHEME", "", 1);
|
||||
QApplication app(argc, argv);
|
||||
QQmlApplicationEngine engine;
|
||||
|
||||
// Managing some env variables
|
||||
|
||||
// Manage import paths
|
||||
QStringList importPathList = engine.importPathList();
|
||||
importPathList.prepend(QCoreApplication::applicationDirPath() + "/imports/");
|
||||
engine.setImportPathList(importPathList);
|
||||
|
||||
engine.load(QUrl("qrc:/main.qml"));
|
||||
|
||||
return app.exec();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user