Skip to content
This repository has been archived by the owner on Jul 20, 2022. It is now read-only.

Commit

Permalink
Quit on leave
Browse files Browse the repository at this point in the history
  • Loading branch information
PedroHLC committed Oct 1, 2019
1 parent e334bd3 commit c1891a2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main.cpp
Expand Up @@ -21,6 +21,7 @@
*/

#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QQmlContext>
#include <QObject>
#include <QQmlComponent>
Expand Down Expand Up @@ -52,6 +53,9 @@ int main(int argc, char *argv[])
context->setContextProperty(QStringLiteral("lang"), m_lang);
context->setContextProperty(QStringLiteral("assetsPath"), appPath.resolved(QStringLiteral(ASSETS_PATH)));

// Some connections
QObject::connect(view.engine(), &QQmlApplicationEngine::quit, &QGuiApplication::quit);

// Show view
view.setSource(appPath.resolved(QStringLiteral(QML_PATH "MainContainer.qml")));
view.setResizeMode(QQuickView::SizeRootObjectToView);
Expand Down

0 comments on commit c1891a2

Please sign in to comment.