The Qt event loop is tied to your Activity. An Android app can have several 
activities (which are UIs) and services. Android can kill your app at anytime, 
you're supposed to stave your UI state inva bundle and restore it when it's 
needed again, as per lifecycle events. It's annoying.

> Sent: Saturday, November 30, 2019 at 1:36 PM
> From: "Alexander Dyagilev" <alervd...@gmail.com>
> To: "interestqt-project. org" <interest@qt-project.org>
> Subject: [Interest] Android: can QCoreApplication::exec() be terminated 
> unexpectedly?
>
> Hello,
>
> It seems that my app "suffers" from unexpected terminating of
> QCoreApplication::exec() event loop processing.
>
> I was always thinking that QCoreApplication::exec() terminates only if
> one calls QCoreApplication::quit().
>
> But under Android it seems that either QCoreApplication::quit() is
> somehow called by Qt itself (i.e. not by my code), or it's terminated
> due to an unknown (for me) reason.
>
> I use QApplication for main activity process and QAndroidService for
> service process. Don't know exactly inside what process this occurs.
>
> _______________________________________________
> Interest mailing list
> Interest@qt-project.org
> https://lists.qt-project.org/listinfo/interest
>
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to