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

macOS: not possible to make QWindow background transparent

    XMLWordPrintable

Details

    • macOS
    • ee82f866152a27ef7a0d69f3aa41608d4a058610 (qt/qtbase/5.12)

    Description

      When using QBackingStore to render raster in QWindow on Linux it is enough to add to constructor of child class of QWindow (as described in docs https://doc.qt.io/qt-5/qwindow.html#setFormat) :

      {
         ...
      
         QSurfaceFormat fmt = format(); 
         fmt.setAlphaBufferSize(8); 
         setFormat(fmt);
      
         create();
      
         ...
         //new QBackingStore(this)
      }

      and background becomes transparent.

      On MacOS with the same code it is filled with gray color.

      Attachments

        1. linux.png
          linux.png
          21 kB
        2. macos.png
          macos.png
          21 kB
        3. rasterwindow.zip
          9 kB

        Issue Links

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

          Activity

            People

              vestbo Tor Arne Vestbø
              e.nemtsev Egor Nemtsev
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes