×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    6

    Seeking fix for QCombobox colours on N8

    On N8 the default QCombobox 'closed state' colours are white text on a white background.

    Is there a 'best-practice' solution for this this to make them usable, or is the answer to fiddle around with styles until you have something workable?

    - Chris

  2. #2
    Nokia Developer Expert
    Join Date
    Feb 2008
    Posts
    183

    Re: Seeking fix for QCombobox colours on N8

    This was fixed some time back for Qt (http://scm.dev.nokia.troll.no/projec...d979aceadfbe48). It should be part of Qt 4.7.2.

    If you want to make it work NOW for your app, then you need to "fiddle" with the palette of the widget. Try changing the QPalette::Text and QPalette::HighlightedTex for the widget,
    after teh widget has been polished.

  3. #3
    Registered User
    Join Date
    Nov 2010
    Posts
    6

    Re: Seeking fix for QCombobox colours on N8

    Thank you. I need it to work now, so QPalette it will be..

  4. #4
    Nokia Developer Expert
    Join Date
    Feb 2008
    Posts
    183

    Re: Seeking fix for QCombobox colours on N8

    Note that you can't use hardcoded color, otherwise it will break with other themes.

    Easiest solution is to ask the palette color from QSpinBox and use the returned color for QComboBox as well.
    QSpinBox has the correct colors from theme. You can either create a non-visible spinbox for this purpose, or use the QApplication's palette hash.

Similar Threads

  1. QComboBox Allignment
    By maruthisri in forum Qt
    Replies: 1
    Last Post: 2010-06-08, 14:11
  2. how to change the title of the QComboBox?
    By Sasler in forum Nokia N9
    Replies: 1
    Last Post: 2010-03-22, 13:09
  3. problem in the Qt QComboBox!
    By mismael in forum Nokia N9
    Replies: 2
    Last Post: 2010-03-22, 09:49

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×