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

OS X shadows aren't invalidated correctly when creating a QWidget with the Qt::FramelessWindowHint flag

    XMLWordPrintable

Details

    • macOS

    Description

      When creating a QWidget with the Qt::FramelessWindowHint flag on OS X, the Qt painting engine doesn't invalidate OS X's shadows around the opaque areas within the widget's client area when the widget itself is invalidated.

      I've found a workaround for this, which is to insert the following code at the end of the widget's ::paintEvent(...) override, but I would imagine Qt should be doing this itself where appropriate:

      #if QT_MAC_USE_COCOA
      NSView* view = reinterpret_cast<NSView*>(winId());
      NSWindow* cocoaWin = [view window];
      [cocoaWin invalidateShadow];
      #endif

      Attachments

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

        Activity

          People

            richard Richard Moe Gustavsen
            meastwood Michael Eastwood
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes