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

Mac, Add support for "tear off menus" in main menu bar

    XMLWordPrintable

Details

    • macOS

    Description

      Note from development: We can support this when Apple starts to support this.

      It would be nice if it was possible to use tear off menus in the menu bar on Mac.

      Currently this is only possible when not using the mac menu integration, for example with:

      • Setting the environment variable: export QT_MAC_NO_NATIVE_MENUBAR=1
      • The menu will have a dotted line that will tear off the menu in its own window.
        #include <QtGui>
        #include <QDebug>

      int main(int argc, char *argv[])
      {
      QApplication app(argc, argv);
      QMainWindow w;
      QMenu * menu = w.menuBar()->addMenu("menu");
      menu->setTearOffEnabled ( true );
      for (int a=0; a < 15; a++)

      { menu->addAction("xyz"); }

      w.show();
      return app.exec();
      }

      Attachments

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

        Activity

          People

            sorvig Morten Sørvig
            admin Administrator
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes