I'm using Qt 5.7 on Windows 7.
I can make my QWindow have opacity, but it can't be transparent.
// window1.qml
Window {
width: 640
height: 480
color: "transparent"
} // no transparent, black background
// window2.qml
Window {
width: 640
height: 480
color: "transparent"
opacity: 0.5
} // black but 50% opacity background
But if I enable aero, then it would be transparent without any problem.
I've read a lot of articles about it. but I couldn't find correct answer.
https://stackoverflow.com/a/22554797/6356562 - set surface format
This answer doesn't work for me.
How can I solve it?
I tried this code with
Qt 5.8
:And I get this result: I recommend you use
Qt 5.8
.