Problem: Transparent Background with Stylesheets
Hi,
I have read some threads about similar problems but I couldn't find an answer for mine. What I want is to set a background color with alpha for e.g. QMenus over a stylesheet. My application has a plastique style and I compile my code for Windows as well as Mac. Now the problem. Everything works fine under Mac. There I get a menu with transparent background. The same code under Windows7 results in an opaque background of the menu. Any hints how I can solve this problem?
Regards,
Marcus
Re: Problem: Transparent Background with Stylesheets
I vaguely recall that a WINDOW on Windows always has an opaque background. Will a widget work instead?
Re: Problem: Transparent Background with Stylesheets
Hi DanH,
what do you mean by "will a widget work instead"? I can set the windowOpacity of widget to some alpha value between 0.0 and 1.0 and I get semitransparent toplevel windows. That's not the problem. What I want is a semitransparent Menu e.g. in connection with an action of my mainwindow toolbar. Therefore I set the background attribute in my stylesheet for QMenus but the alpha is only working on OSX. So what can I do to get the alpha working on Windows as well? Do I have to set some Flag to the QMenu to tell Windows that it can have transparent backgrounds?
Regards,
Marcus