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
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
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.
Thank you. I need it to work now, so QPalette it will be..
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.