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

Android application close does not emit signals and close event.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.9.6
    • Widgets: Main Window
    • None
    • Android

    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.

      Attachments

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

        Activity

          People

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

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes