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



  • 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!



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



  • Hi,

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



  • 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.


Log in to reply
 

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