Results 1 to 5 of 5

Thread: QPalette Coordinating

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: QPalette Coordinating

    Implement a proxy style and modify the palette before the actual painting routines are called. Alternatively you can go through all widgets of the application and apply the palette manualy, but it's not a good solution. In Qt4 you could simply use stylesheets instead of all that...

    Please make sure the situation is really caused by Qt and not by some error in your code before applying my suggestions. Test it on the simplest code possible. The problem might be completely different than you think (you might be using wrong colour roles for instance).

  2. #2
    Join Date
    Jan 2006
    Location
    Ohio
    Posts
    332
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    37
    Thanked 8 Times in 4 Posts

    Default Re: QPalette Coordinating

    I was setting the colors for the Active and Inactive states of Text and ButtonText but wasn't doing it for the Foreground part and now I make sure to add the palette to the QColorGroup::Foreground and now it works for what I need! Thanks for your help though!!!

Similar Threads

  1. QPalette Question
    By jlgerber in forum Newbie
    Replies: 7
    Last Post: 14th November 2006, 19:19
  2. QPalette isn't working
    By roleroz in forum Qt Programming
    Replies: 5
    Last Post: 19th October 2006, 20:15
  3. QPalette help pls
    By munna in forum Qt Programming
    Replies: 4
    Last Post: 28th September 2006, 14:41
  4. QPalette help pls
    By munna in forum Qt Programming
    Replies: 7
    Last Post: 24th July 2006, 19:01
  5. QPalette won't set QLabel's Window & Foreground color
    By koklim in forum Qt Programming
    Replies: 6
    Last Post: 23rd January 2006, 10:27

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
  •  
Qt is a trademark of The Qt Company.