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

Size grip cannot be controlled on Mac

    XMLWordPrintable

Details

    • macOS

    Description

      There is currently no way to remove the sizing grip from the QMainWindow on Mac.
      There is no Window flag to set the window to 'non-resizable', even when the QMainWindow has Fixed size.

      Currently I am using the following hack to remove the status bar area with size grip, and then reduce window height accordingly.

      void setupWindowWithoutStatus(QWidget* w){
      NSView* view = (NSView*) w->winId();
      NSWindow* win = [view window ];
      NSRect fr = win.frame;
      fr.size.height -= 22;
      [win setFrame:fr display:YES];

      NSUInteger mask = [win styleMask];
      [win setStyleMask:(mask & ~NSResizableWindowMask)];

      }

      Attachments

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

        Activity

          People

            vfm Thierry Bastian (closed Nokia identity) (Inactive)
            reflog Eli Yukelzon
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes