From c09350b7c9adf6327f0a0475c897a71dd23b6cae Mon Sep 17 00:00:00 2001 From: Orangerot Date: Thu, 15 Aug 2024 21:24:28 +0200 Subject: feat(SportModel): request API, parse and display Model --- src/main/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/main') 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 // #include +#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); -- cgit v1.2.3