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
          21 kB
          Egor Nemtsev
        2. macos.png
          21 kB
          Egor Nemtsev
        3. rasterwindow.zip
          9 kB
          Egor Nemtsev

        Issue Links

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

          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