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

macOS: Top Level Transparent Window Regression Since 5.15 onwards - QML

    XMLWordPrintable

Details

    • macOS

    Description

      Transparency for a top level window on Mac seems broken since 5.15 onwards. Does not match behavior on other platforms.

      https://forum.qt.io/topic/128900/popup-qml-window-with-transparent-background-changed-5-14-5-15-6-2/2

       
      I have a cross platform application that has a menu popup that can be triggered by hardware at any cursor position with the cursor centered in the popup. This custom menu is not rectangular but circular, and the window itself was transparent. When the user mouses out of the menu, it will close.

      In qt 5.14 and prior, everything worked as expected with a transparent window behind the central "menu"

      In 5.15, on mac the transparency seems impossible to regain no matter what combination of flags and settings or workarounds I apply, and always is black.

      In 6.2, the behavior seems to have changed again. Now there is a window shadow and no longer possible to hide the window frame.

      This is the exact same code, simply compiled using 5.14, 5.15, and latest 6.2 on Mac. Here is a small application demonstrating the behavior.

      Any thoughts? Any better way to get a transparent window containing a custom drawn QML interface of non-rectangular shape? Windows seems to retain the behavior through all revisions so maybe this is a Mac only bug?

      Code attached.

      Attachments

        1. image-2021-10-12-13-30-00-021.png
          71 kB
          Tor Arne Vestbø
        2. main.qml
          2 kB
          Tim Wessman

        Issue Links

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

          Activity

            People

              lagocs Laszlo Agocs
              timwessman Tim Wessman
              Votes:
              1 Vote for this issue
              Watchers:
              11 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes