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

Adding menu item with ApplicationSpecificRole results in duplicate menu items on Mac OS

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P2: Important P2: Important
    • None
    • 4.7.0, 5.6.0, 5.9.0 Alpha, 5.12.3, 6.4.1
    • Widgets: Main Window
    • None
    • macOS, possibly all supported versions.

      Mac OS 10.6.4. Qt 4.7.0/Cocoa or Qt 4.6.3/Carbon.

      For each MainWindow I create a menu bar, a menu, and an item in the menu with an ApplicationSpecificRole.

      Qt automatically moves my menu item to the application menu (since it has ApplicationSpecificRole).

      Unfortunately, when I have two windows and switch between them, the items in the Application menu are not cleared. This results in multiple copies of my menu item in the Application menu.

      This is different behavior from Qt 4.6.

      I've attached a sample application. Run the application. It will display two windows. Move the top one and click on the bottom one. Now click in the menu application menu. You'll see two 'Action' items at the top.

      Run the same test under Qt 4.6 and you'll only see one.

      A similar bug is http://bugreports.qt.nokia.com/browse/QTBUG-11176

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

            tpochep Timur Pocheptsov
            cmeyer Chris Meyer
            Votes:
            9 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:

                There is 1 open Gerrit change