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

RHI Metal: transparent toplevel windows don't work

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • None
    • 5.14.0 Alpha
    • None
    • macOS Metal RHI
    • 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

              lagocs Laszlo Agocs
              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