Save some events when closing app



  • Hello;

    I decided to make a simple game as the startup application.My app content a qml file and main.cpp that include these code;

    @#include <QtGui/QGuiApplication>
    #include "qtquick2applicationviewer.h"
    #include<QtGui>

    int main(int argc, char *argv[])
    {
    QGuiApplication app(argc, argv);

     QtQuick2ApplicationViewer viewer;
     viewer.setMainQmlFile&#40;QStringLiteral("qml/zekaOyunu/main.qml"&#41;&#41;;
     viewer.showExpanded();
    
    return app.exec&#40;&#41;;
    

    }
    @
    I think it is codes in the file to show the QML file making by wizard. So I can not use QtQuick.Window for catching closing app. I want to save score and show a dialog when user want to quit app.How do I these events.
    Thanks for answers.


  • Moderators

    Another "duplicate":http://qt-project.org/forums/viewthread/38747/
    Closing this one.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.