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

RHI Metal: transparent toplevel windows don't work

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.14.0 Alpha
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      macOS Metal RHI
    • Platform/s:
      macOS

      Description

      I've just tried using the new RHI backend with a non-trivial application on macOS Metal. Very impressive!

      However It looks like transparent toplevel windows are not yet supported. This also used to be a problem in QtQuick 2 early days (QTBUG-61909).

      The following example uses a transparent window background with QSG_RHI=0 but a black background with QSG_RHI=1.

      import QtQuick 2.12
      import QtQuick.Window 2.12
      
      Window {
        visible: true
        width: 640
        height: 480
        title: qsTr("Hello World")
        color: "transparent"
        flags: Qt.Window | Qt.FramelessWindowHint
      
        Rectangle {
          height: 100
          width: 100
          anchors.centerIn: parent
          color: "red"
        }
      }
      

      Setting QQuickWindow::setDefaultAlphaBuffer(true) early in main.cpp does not make any difference.

        Attachments

          Issue Links

          For Gerrit Dashboard: QTBUG-78089
          # Subject Branch Project Status CR V

            Activity

              People

              • Assignee:
                lagocs Laszlo Agocs
                Reporter:
                njeisecke Nils Jeisecke
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Gerrit Reviews

                  There are no open Gerrit changes