diff options
Diffstat (limited to 'demo/main.cpp')
| -rw-r--r-- | demo/main.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/demo/main.cpp b/demo/main.cpp new file mode 100644 index 0000000..64c4f22 --- /dev/null +++ b/demo/main.cpp @@ -0,0 +1,23 @@ +/** + * @file main.cpp + * @brief Entry point for the QtXpl2 demo application. + */ +#include <QGuiApplication> +#include <QQmlApplicationEngine> + +#include <QtQml/QQmlExtensionPlugin> +Q_IMPORT_QML_PLUGIN (Xpl2Plugin) + +int +main (int argc, char *argv[]) +{ + QGuiApplication app (argc, argv); + + QQmlApplicationEngine engine; + QObject::connect ( + &engine, &QQmlApplicationEngine::objectCreationFailed, &app, + [] () { QCoreApplication::exit (1); }, Qt::QueuedConnection); + + engine.loadFromModule ("QtXpl2Demo", "Main"); + return app.exec (); +} |
