aboutsummaryrefslogtreecommitdiffstats
path: root/demo/main.cpp
diff options
context:
space:
mode:
authorThomas Vanbesien <tvanbesi@proton.me>2026-03-11 11:02:24 +0100
committerThomas Vanbesien <tvanbesi@proton.me>2026-03-11 11:09:40 +0100
commit35309337aacac2eac7d7215e526bddcf7647b8cf (patch)
tree3626e5e5e17e23122deab1bf3ade0502872873f3 /demo/main.cpp
downloadQtXpl2-35309337aacac2eac7d7215e526bddcf7647b8cf.tar.gz
QtXpl2-35309337aacac2eac7d7215e526bddcf7647b8cf.zip
Initial project setup: Qt 6.10.2 TCP client library for Alchemie XPL2 protocol
- Static library (src/) with QML singleton Xpl2Client for TCP communication - Qt Quick demo app (demo/) with connection UI, command input, and response log
Diffstat (limited to 'demo/main.cpp')
-rw-r--r--demo/main.cpp23
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 ();
+}