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

[macOS] Platform MenuBar can't be hidden after creation

    XMLWordPrintable

Details

    • macOS

    Description

      Platform MenuBar can't be hidden/unloaded after creation via Loader.

      Sample code:

      import QtQuick
      import QtQuick.Controls
      import Qt.labs.platform as Platform
      
      Window {
          width: 640
          height: 480
          visible: true
      
          Loader {
              id: menuBarLoader
              active: false
              sourceComponent: Platform.MenuBar {
                  Platform.Menu {
                      title: 'Menu1'
                      Platform.MenuItem { text: "Action1..." }
                  }
                  Platform.Menu {
                      title: 'Menu2'
                      Platform.MenuItem { text: "Action2..." }
                  }
                  Platform.Menu {
                      title: 'Menu3'
                      Platform.MenuItem { text: "Action3..." }
                  }
              }
          }
      
          Button {
              text: menuBarLoader.active ? 'Hide MenuBar' : 'Show MenuBar'
              onClicked: menuBarLoader.active = !menuBarLoader.active
          }
      }
      

      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ø
              studiosus Vladimir Belyavsky
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes