From 7467b6580954fc4b8d5d41417a1225ba71fb3418 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Sun, 3 Mar 2024 21:37:47 -0800 Subject: [PATCH] feat: attach Qt.quit and Qt.exit functions --- src/core/rootwrapper.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/rootwrapper.cpp b/src/core/rootwrapper.cpp index baf4e4c..1ef7596 100644 --- a/src/core/rootwrapper.cpp +++ b/src/core/rootwrapper.cpp @@ -2,6 +2,7 @@ #include #include +#include #include #include #include @@ -21,6 +22,10 @@ RootWrapper::RootWrapper(QString rootPath) , rootPath(std::move(rootPath)) , engine(this) , originalWorkingDirectory(QDir::current().absolutePath()) { + auto* app = QCoreApplication::instance(); + QObject::connect(&this->engine, &QQmlEngine::quit, app, &QCoreApplication::quit); + QObject::connect(&this->engine, &QQmlEngine::exit, app, &QCoreApplication::exit); + this->reloadGraph(true); if (this->root == nullptr) {