Results 1 to 2 of 2

Thread: QMenu style sheet: works in dev env, breaks in release

  1. #1
    Join Date
    Sep 2007
    Location
    Rome, GA
    Posts
    199
    Thanks
    14
    Thanked 41 Times in 35 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default 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:

    Qt Code:
    1. QString menu_ss = "QMenu { color: white; background-color: black; margin: 0px; }" +
    2. QString("QMenu::item:selected { color: grey; background: black; }");
    3.  
    4. qApp->setStyleSheet(menu_ss);
    To copy to clipboard, switch view to plain text mode 

    When I run it in release mode from Visual Studio, it looks as it should, like this:



    But when I run a deployed executable, it looks like this:



    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

  2. #2
    Join Date
    Sep 2007
    Location
    Rome, GA
    Posts
    199
    Thanks
    14
    Thanked 41 Times in 35 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Windows

    Default 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!

  3. The following user says thank you to JimDaniel for this useful post:

    fnmblot (6th October 2008)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.