Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QT5.3 android : QApplication::AboutToQuit() not called

QT5.3 android : QApplication::AboutToQuit() not called

Scheduled Pinned Locked Moved Mobile and Embedded
4 Posts 2 Posters 1.6k Views 1 Watching
  • 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.
  • B Offline
    B Offline
    bizut
    wrote on last edited by
    #1

    Hi All,

    I'd like to do some saving when i close my application.
    In my QMainWindow, i do this :
    @connect (qApp, SIGNAL(AboutToQuit()), this, SLOT(OnAboutToQuit()));@

    But the slot is never called when i close the application.
    I can see thanks to applicationStateChanged() that the state becomes ApplicationSuspended when i click on the Home Button. But i cannot do clean up here since i could decide to come back to the application at this point.

    Would you have an idea about what is wrong and above all how to save a state before the exit ?
    Thank you all!

    1 Reply Last reply
    0
    • GianlucaG Offline
      GianlucaG Offline
      Gianluca
      wrote on last edited by
      #2

      Pay attention to the upper and lower case of the method name.
      The signal is aboutToQuit and no AboutToQuit
      Check in your code.

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bizut
        wrote on last edited by
        #3

        Hi,

        In my code, the call is right, it was just a typo when i wrote the post.

        1 Reply Last reply
        0
        • GianlucaG Offline
          GianlucaG Offline
          Gianluca
          wrote on last edited by
          #4

          So, it seems a bug. Please, file it on https://bugreports.qt-project.org

          If it's really a bug, then a possible workaround would be to extend QtActivity.java and in the onDestroy method call a native method that performs the task on quitting.

          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