Question

I noticed that the sample apps from QT show their menu bar as opaque, and with a color that doesn't match any of the styling on the window. It seems as if the windows being created by QT when running on Vista or Windows 7 don't pick up the translucency that are no the mainstay of the new Windows look and feel. Is there a way to override this in QT, or even have a custom painted menu?

Was it helpful?

Solution

On Windows 7 there is a special flag that activates the "Glass" Look&Feel:

Here is some more detailed information: http://labs.trolltech.com/blogs/2009/09/15/using-blur-behind-on-windows/

Screenshot http://labs.trolltech.com/blogs/wp-content/uploads/2009/09/blurbehind2.png

From what I see, only the Qt::WA_TranslucentBackground flag is involved.

OTHER TIPS

All of my Qt applications look native on Vista/Win7, including the "glass" frame. This is all by default.

I must admit I don't know where you got this idea that they don't. Here's what the Browser demo that comes with Qt looks like on my Win7 machine.

alt text http://img28.imageshack.us/img28/5535/qtacrossplatformapplica.png

I can't see anything wrong with it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top