Details
-
Bug
-
Resolution: Fixed
-
P3: Somewhat important
-
5.12.0
-
None
-
-
7c33f4be0 (dev), 9a4df2b92 (6.5)
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 |
457651,2 | Support window masks on WASM | dev | qt/qtbase | Status: MERGED | +2 | 0 |
467380,2 | Support window masks on WASM | 6.5 | qt/qtbase | Status: MERGED | +2 | 0 |