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

QPlatformMessageDialogHelper cannot be closed from outside

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.2.0
    • None
    • Android, WinRT, any qpa with native dialogs
    • Android

    Description

      This applies to Android, but also on any other platform trying to reuse the QPlatformMessageDialogHelper approach.

      Consider the following setup:

      • Create a QMessageBox with some buttongs
      • Call exec()
      • Use a singleShotTimer on close() of the QMessageBox to close the Message box after x seconds.

      Expected Result: The native dialog closes
      Actual Result: The dialog stays and does not get notified about it supposed to be quit.

      the QMessageBox::closeEvent() basically does nothing to it and considers QDialog to handle the proper closing. But that one does not respect native dialogs either.

      While this might be considered a special use-case it is how all unittests for QMessageBox work and hence after showing the first one, the test just hangs and waits to be externally terminated.

      Furthermore the same problems occur on WinRT, which adopts to the QPlatformMessageDialogHelper usage in the theming.

      Attachments

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

        Activity

          People

            tvete Paul Olav Tvete
            mkalinow Maurice Kalinowski
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes