1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include "MainApp.h" #include <QCloseEvent> bool MainApp::event (QEvent *event) { // Catch application exit event and signal to qml app to handle exit if(event->type() == QEvent::Close) { event->ignore(); emit closing(); return true; } return false; }