Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User cdhutch's Avatar
    Join Date
    Nov 2010
    Posts
    6
    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 Fuzzbender's Avatar
    Join Date
    Feb 2008
    Posts
    183
    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 cdhutch's Avatar
    Join Date
    Nov 2010
    Posts
    6
    Thank you. I need it to work now, so QPalette it will be..

  4. #4
    Nokia Developer Expert Fuzzbender's Avatar
    Join Date
    Feb 2008
    Posts
    183
    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. Replies: 1
    Last Post: 2010-10-25, 15:09
  2. QComboBox Allignment
    By maruthisri in forum Qt
    Replies: 1
    Last Post: 2010-06-08, 14:11
  3. how to change the title of the QComboBox?
    By Sasler in forum Nokia N9
    Replies: 1
    Last Post: 2010-03-22, 13:09
  4. 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
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved