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

webassembly: QDialog Transparent background

    XMLWordPrintable

Details

    Description

      Hello,

      On windows, I use the following code to make the QDialog or QWidget to have transparent background with overlaying image.

          setWindowFlags( Qt::FramelessWindowHint );
           setMask(QPixmap(":/images/ui/Inventory/inventory_texture_alpha.png").mask());
      

       

      The widget showed fine with transparent background and the overlay image.

      However, on the web assembly, that method didn't work. I also tried with all of the following options below:

          setStyleSheet("background-color: rgba(255,255,255,0)");
      
          setAttribute(Qt::WA_TranslucentBackground);
           setAutoFillBackground(true);
           setWindowFlags( Qt::FramelessWindowHint );
           setMask(QPixmap(":/images/ui/Inventory/inventory_texture_alpha.png").mask());
      

       

      If you visit my test link at www.empirefantasy.com/wasm (tested on Firefox only) and sign in with credential (user: test@test.com, pass: test123) or create an account. Once you sign in, you can click on "Bag" icon and the window will show up. You will see the black background of the widget is still showing and not transparent.

       

      thanks,

      Cody

       

      Attachments

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

        Activity

          People

            mikolaj.boc Mikołaj Boc (Inactive)
            onesingleton Dien Thai
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes