From 9ec42c7e9c4a96d54bbf526cbd93f07c78e2415e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Fri, 13 Sep 2019 18:29:31 +0800 Subject: Manage to show tasks but the view is widened vertically yet. --- controller.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'controller.cxx') diff --git a/controller.cxx b/controller.cxx index b9bdf5e..42b1ece 100644 --- a/controller.cxx +++ b/controller.cxx @@ -1,6 +1,8 @@ #include +#include #include "worker.hxx" #include "user.hxx" +#include "tasklist.hxx" #include "controller.hxx" Controller::Controller(QObject* parent) : QObject{parent} @@ -22,6 +24,11 @@ Controller::Controller(QObject* parent) : QObject{parent} auto user = engine->singletonInstance(User::typeId); connect(worker, SIGNAL(logged(rt_user*)), user, SLOT(update(rt_user*))); + auto taskList = engine->singletonInstance(TaskList::typeId); + engine->rootContext()->setContextProperty("taskList", taskList); + connect(worker, SIGNAL(foundTasks(rt_ticketlist*)) + , taskList, SLOT(addTasks(rt_ticketlist*))); + thread.start(); } -- cgit v1.2.3