diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main/main.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/src/main/main.cpp b/src/main/main.cpp index bc8f460..4796716 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -1,6 +1,19 @@ -#include <iostream> +#include <QGuiApplication> +#include <QQmlEngine> +#include <QQmlContext> +#include <QQmlComponent> -int main() { - std::cout << "Hello, World!" << std::endl; - return 0; +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(); } |