Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Save some events when closing app

Save some events when closing app

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    armas2
    wrote on last edited by
    #1

    Hello;

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

    @#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;);
     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.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      Please don't post the same question multiple times

      "Duplicate":http://qt-project.org/forums/viewthread/38727/

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • A Offline
        A Offline
        armas2
        wrote on last edited by
        #3

        Sorry,I did not see because of slow internet connection.How can remove.is it possible?

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          You can't, only moderators can do that

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved