aboutsummaryrefslogtreecommitdiffstats
path: root/demo/main.cpp
blob: 64c4f229fe0347fae38a08306b6dcdbbb4d433a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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 ();
}