Win XP Transparency
-
Hello,
I am developing a software with Qt5 on Windows (MinGw 5.7). I want my program to be compatible with WinXP.
The only problem is transparency...Every application window I create that is transparent will not show in XP.
What can I do (I need transparent windows).Thank you very much,
Alex
-
Hi! I'll ask this (stupid?) question before someone else feels invited: Doesn't "transparent" mean "doesn't show up"?
-
hahaha ok well I underderstand how it may sound, I guess I must clarify some things !
I have an application window. I need a part of this application window to be transparent.
However, if any part of the application window is transparent, the application window does not show.
It's like if the application window totally crashes because it doesn't know what Transparent is...Thanks !
Alex
-
@mrjj Good idea. I ran more tests with a very simple interface to find the problem. It's a green application window containing a red square. I compile the program on Windows 8 and it works on Win XP also.
First, with the following code, instead of a green application window, I set it as transparent. However, the application window becomes black. instead of transparent. What I should see is a red square on a transparent larger window but what I see is a red square on a black larger window.
ApplicationWindow { visible: true width: 640 height: 480 title: qsTr("Hello World") color:"green" Rectangle { width: 150 height: 150 color:"red" } }
I also need to enable some flags (Qt.FramelessWindowHint and Qt.WindowStaysOnTopHint). However, when I do this with a transparent application window, nothing appears at all. What I should see is a red square on a transparent larger window but what I see is nothing at all.
ApplicationWindow { visible: true width: 640 height: 480 title: qsTr("Hello World") flags: Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint color:"green" Rectangle { width: 150 height: 150 color:"red" } }
I also ran the same code on a Windows 7 64 bit PC.
Instead of not showing at all, the transparent portion was black.
Everything works well on my PC on Windows 8 and 10.Thank you very much !
Alex