QMenu style sheet: works in dev env, breaks in release
I'm at my wit's end with this. Maybe you guys can help me out.
In my application I set my app's style sheet like so:
Code:
QString menu_ss
= "QMenu { color: white; background-color: black; margin: 0px; }" + QString("QMenu::item:selected { color: grey; background: black; }");
qApp->setStyleSheet(menu_ss);
When I run it in release mode from Visual Studio, it looks as it should, like this:
http://i209.photobucket.com/albums/b.../good_menu.jpg
But when I run a deployed executable, it looks like this:
http://i209.photobucket.com/albums/b...9/bad_menu.jpg
Does any one have any idea what might be causing this?
I'm concatenating many style sheets together when I set my app's style sheet. I left the others out in the example for brevity's sake. However, all the others work perfectly when deployed, only QMenu does not.
I'd appreciate any help you can give.
-Daniel
Re: QMenu style sheet: works in dev env, breaks in release
UPDATE: Its fixed. The problem seems to be that Vista wants to override the style, messing it up. To fix it, I set a new QCleanlooksStyle to the widget, and problem solved!