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

[REG 5.7.0->5.12.3] macOS: Adding submenus via setMenu in aboutToShow() doesn't work

    XMLWordPrintable

    Details

    • Platform/s:
      macOS
    • Commits:
      265906 5b5e8f78fecbe2bd9279bfa9ef10015cef8b1bc7 (qt/qtbase/5.12)

      Description

      Dynamically building submenus QAction::setMenu from within the aboutToShow slot no longer works.

      This has been working for many years but stopped after we very recently moved from Qt 5.7.0 to to the latest LTS version, 5.12.3.

      See attached sample program.

      Please look at MainWindow::createMenuMain(). The populate_menu_on_about_to_show defaults to true and will show the bug. If you set it to false then the same populate submenu code will be called directly instead of delayed until aboutToShow and the second submenu is created properly.

      We have confirmed this regression exists on 5.9.7, 5.11.2 and 5.12.0 and 5.12.3.

      This seems to be similar to QTBUG-54633 which was closed as fixed in 5.6.1.

       

       

        Attachments

        For Gerrit Dashboard: QTBUG-76060
        # Subject Branch Project Status CR V

          Activity

            People

            • Assignee:
              tpochep Timur Pocheptsov
              Reporter:
              tom.ransdell Tom Ransdell
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes