Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.9.6
-
None
Description
Just create an application for Android with target API level 26 (as I did). Make your own MainWindow::QMainWindow in it. Do connect QApplication::aboutToQuit() signal to slot MainWindow::goingQuit() and do qWarning()<<"bye-bye"; in this slot. Also write protected method
MainWindow::closeEvent(QCloseEvent* e)
and call MainWindow::goingQuit() inside it. Make application and install on connected Android 7 or 8 device. Run this application from QtCreator. On the device call Android task manager by typing right most system virtual button. Find your application in task list and tap on it's close button with X sign. Application will silently die - you will see this in QtCreator application output. No "bye-bye" message will appear. That means - not the signal QApplication::aboutToQuit() was emitted, nor QCloseEvent for window was posted. This is HUGE bug cause this application close method is absolutely normal in Android 7 and newer. Qt-application MUST process it and provide all normal events and signals as in other OSes.