Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-75525

Android application close does not emit signals and close event.



    • Type: Bug
    • Status: Reported
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.9.6
    • Fix Version/s: None
    • Component/s: Widgets: Main Window
    • Labels:
    • Platform/s:


      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.


        No reviews matched the request. Check your Options in the drop-down menu of this sections header.



            • Assignee:
              qt.team.quick.subscriptions Qt Quick and Widgets Team
              gourmand64 Gourmet
            • Votes:
              1 Vote for this issue
              2 Start watching this issue


              • Created:

                Gerrit Reviews

                There are no open Gerrit changes