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

setUnifiedTitleAndToolBarOnMac does not work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2: Important P2: Important
    • None
    • 6.8.2
    • GUI: Window management
    • None
    • macOS

      The code setUnifiedTitleAndToolBarOnMac does not work on Qt6.8.2, but works fine on Qt 6.5.3.

      // code placeholder
      void hideWindowTitleBar(QMainWindow *window)
      {
          window->setUnifiedTitleAndToolBarOnMac(true);    NSView* nativeView = reinterpret_cast<NSView*>(window->winId());
          NSWindow* nativeWindow = [nativeView window];    [nativeWindow setStyleMask:[nativeWindow styleMask] |
           NSWindowStyleMaskFullSizeContentView | NSWindowTitleHidden];
          [nativeWindow setTitlebarAppearsTransparent:YES];
          [nativeWindow center];
      } 

        1. Qt6.5.3_new.jpg
          Qt6.5.3_new.jpg
          19 kB
        2. Qt6.8.2_new.jpg
          Qt6.8.2_new.jpg
          22 kB
        3. uidesign.png
          uidesign.png
          23 kB
        4. UnifiedTitleBarSourceCode.zip
          9 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            vestbo Tor Arne Vestbø
            anyetiangong liyu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes