PDA

View Full Version : Different Color Scheme between XP and Windows 7



KenJustKen
30th November 2011, 15:20
When run my QT application on Windows 7 I get a white background and default color of my dialogs and everything. When I run the same binary on XP it goes to grey. Because of my images, the grey is messsing me up. How can I force XP to use the White color scheme?

Ken

d_stranz
30th November 2011, 17:32
You could explicitly set a style for your app using QApplication::setStyle() which would make your app look roughly the same on each platform, but would probably make it look "different" from a native app. I believe that the default drawing of primitives (buttons, backgrounds, highlights, etc.) is done using the platform's native API, so any differences between XP and Win 7 are the result of native implementations on each.

You could also play around with the palette for the app (or for individual widgets if an app-wide change in undesirable), changing the QPalette::Window color, for example.

KenJustKen
8th December 2011, 07:02
The problem is I have buttons with Icons and picures on them and I also build some myself, and I did all of the work on Win 7. Now, the XP looks like junk. :(