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

QPlatformMessageDialogHelper cannot be closed from outside

XMLWordPrintable

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

      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.

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

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

              Created:
              Updated:

                There are no open Gerrit changes