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

QMessageBox on mac no longer returns focus to mainwindow that invokes it

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 6.5.2
    • None
    • macos Ventura 13.5.1 arm64 and x86_64, Qt 6.5.2
    • macOS

    Description

      Under macOS, the new native QMessageBox upon returning does not return focus/activate the MainWindow that invoked it.

      Given the number of QMessageBoxs in an application like Sigil, this bug changes everyone's long standing work flow and gui expectancy by now requiring the focus/activation manually.

      See the attached standalone program to recreate the bug.

      To run it:

      unzip bug_report.zip
      cd bug_report
      qmake
      make

      open ./bug_report.app

      There is a macos application menubar that differs from the main window menubar. Use the current menubar (Window 1's menubar) menu Test-> Run MessageBox.

      Notice the change to the application menubar when the QMessageBox is active.
      Click OK

      Notice that the application menubar stays, and the MainWindow that invoked the QMessageBox itself is not activated (meaning its menubar is not being shown).

      The user now has to click on MainWindow 1 just to get focus back after running the QMessageBox. This bug does not exist in earlier versions of Qt without native QMessageBoxes.

      Please fix this.

      Attachments

        Issue Links

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

          Activity

            People

              vestbo Tor Arne Vestbø
              kevinhendricks Kevin B. Hendricks
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes