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

Mac: QMenubar not updated properly when MainWindow uses QWebEngineView that is loaded outside the MainWindows constructor

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • None
    • 6.4.3, 6.5.0
    • None
    • mac os
    • macOS

    Description

      On the MacOS platform. Due to a recent change post Qt 6.3.2 the updating of QMenubar is corrupted when multiple QMainWindows each with QWebEngineView exist.

      I have created a standalone test case that tests for detects when a QAction is sent to the non-active non-focus MainWindow from the corrupted qmenubar.

      See the attached bug_report.zip

      Using Qt 6.4.3 or Qt 6.5.0 do the following:

      unzip bug_report.zip
      cd bug_report
      qmake
      make
      open ./bug_report.app

      1. "Window 1" will open with its own menubar.

      2. Use the qmenubar New->New Window menu to create a second main window

      3. Verify that "Another Window" is active.

      4. Use the qmenubar Identify menu to verify its QAction is received by "Another Window" and not "Window 1"

      Result: message "Menubar action delivered to the wrong MainWindow"

      This works correctly on Qt 5.X, Qt 6.2.4, Qt 6.3.2 but fails with Qt 6.4 and 6.5

      Unfortunately my project Sigil, heavily depends on this working as it has literally for years. But now it appears to break.

      I could not see any suspicious changes in qtbase/src/plugins/platforms/cocoa/ from the working Qt 6.3.2 to the non-working Qt 6.4.3

      This problem goes away if instead of docking each widget the code is modified to create them floating (which makes them Qt::Tools which updateMenuBarImmediately ignores).

      So something changed and the presence of a QWebEngineView docked to a MainWindow loading something seems to create the problem.

      Attachments

        1. bug_report2.zip
          4 kB
        2. bug_report.zip
          5 kB
        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
            kevinhendricks Kevin B. Hendricks
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes