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

setUnifiedTitleAndToolBarOnMac does not work anymore

    XMLWordPrintable

Details

    • Bug
    • Resolution: Invalid
    • P2: Important
    • None
    • 6.4.0, 6.5
    • Widgets: Main Window
    • None
    • macOS

    Description

      If a QMainWindow contains a QOpenGLWidget, the macOS unified toolbar does not work anymore. It worked up to Qt 6.3.2, but starting at Qt 6.4 (and now Qt 6.5), the property unifiedTitleAndToolBarOnMac does not have the desired effect anymore. The two attached screenshots show the difference. Both show the official Qt 2D Painting Example , but with the statement "Window window;" in main.cpp replaced by

      QMainWindow window;
      window.addToolBar("ToolBar")->addAction(new QAction("Test"));
      window.setUnifiedTitleAndToolBarOnMac(true);
      window.setCentralWidget(new Window);

      The Qt 6.5 version still has a separate title bar, while it is merged with the toolbar in the Qt 6.3 version.

      Attachments

        1. Qt6.5-1.png
          Qt6.5-1.png
          304 kB
        2. Qt6.3-2.png
          Qt6.3-2.png
          298 kB
        3. image-2023-04-13-10-53-22-212.png
          image-2023-04-13-10-53-22-212.png
          128 kB
        4. image-2023-04-13-10-49-23-362.png
          image-2023-04-13-10-49-23-362.png
          144 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            vestbo Tor Arne Vestbø
            roefer Thomas Röfer
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes