views:

233

answers:

2

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?

+1  A: 

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

I can't see anything wrong with it.

Lucas
Look at your menu bar, with the light blueish/violet background gradient. That should be translucent or it should share the grayish color/gradient of the scrollbar and other controls like the toolbar. It looks very out of place.
Leeks and Leaks
To me it looks just fine.
Lucas
Try adding the flag from the previous answer. Then post the screenshot. Would be curious to see if your menu is now transparent. I personally don't think it looks *bad* per say, but it doesn't look "correct" either.
Leeks and Leaks
+5  A: 

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

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

BastiBense