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

setUnifiedTitleAndToolBarOnMac does not work

    XMLWordPrintable

Details

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

    Description

      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];
      } 

      Attachments

        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

        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ø
              anyetiangong liyu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes