2024-07-26 17:49:18 +02:00
|
|
|
#include <QGuiApplication>
|
|
|
|
#include <QQmlEngine>
|
|
|
|
#include <QQmlContext>
|
|
|
|
#include <QQmlComponent>
|
2024-06-27 12:18:32 +02:00
|
|
|
|
2024-07-26 17:49:18 +02:00
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
QGuiApplication app(argc, argv);
|
|
|
|
|
|
|
|
QQmlEngine engine;
|
|
|
|
QQmlContext *objectContext = new QQmlContext(engine.rootContext());
|
|
|
|
|
|
|
|
QQmlComponent component(&engine, "application.qml");
|
|
|
|
QObject *object = component.create(objectContext);
|
|
|
|
|
|
|
|
// ... delete object and objectContext when necessary
|
|
|
|
|
|
|
|
return app.exec();
|
2024-06-27 12:18:32 +02:00
|
|
|
}
|