summaryrefslogtreecommitdiff
path: root/src/main/main.cpp
diff options
context:
space:
mode:
authorOrangerot <purple@orangerot.dev>2024-08-15 21:24:28 +0200
committerOrangerot <purple@orangerot.dev>2024-08-15 21:24:28 +0200
commitc09350b7c9adf6327f0a0475c897a71dd23b6cae (patch)
treeaa40a8f5c3aabc28360a0851a5f1220611d888bf /src/main/main.cpp
parentf17c2a73e17bb0a2309ae2aba76761f480206656 (diff)
feat(SportModel): request API, parse and display Model
Diffstat (limited to 'src/main/main.cpp')
-rw-r--r--src/main/main.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/main.cpp b/src/main/main.cpp
index cee893e..9f175ac 100644
--- a/src/main/main.cpp
+++ b/src/main/main.cpp
@@ -20,6 +20,7 @@
// console output
#include <QDebug>
// #include <iostream>
+#include "../model/Sport.h"
int main(int argc, char *argv[])
{
@@ -28,6 +29,10 @@ int main(int argc, char *argv[])
QQmlEngine engine;
QQmlContext *objectContext = new QQmlContext(engine.rootContext());
+ SportModel model;
+ model.request();
+ objectContext->setContextProperty("sports", &model);
+
QQmlComponent component(&engine, "qrc:/qt/qml/itat/res/gui/application.qml");
QObject *object = component.create(objectContext);