[Qt-interest] QLabel color with dark themes
Jay L. T. Cornwall
jay at jcornwall.me.uk
Thu Aug 13 20:39:07 CEST 2009
Hi,
I use Qt with the qgtkstyle plugin to adopt the GTK theme. With GTK I
use the Moomex Ultimatum theme which is largely white text on black
backgrounds.
In my Qt application I construct a QLabel and add it to a QStatusBar.
This label correctly appears in white. However, if I construct a QLabel
and add it to a QHBoxLayout, which itself is inside a QMainWindow, the
text appears in black and cannot be read.
Using the text '<font color="white">Test</font>' makes this label appear
in white. Why do the colour schemes of the two labels differ according
to their context? Does Qt have a default stylesheet which makes this so?
(I am aware that dark themes are quite troublesome in Linux.)
--
Jay L. T. Cornwall
http://www.jcornwall.me.uk/
More information about the Qt-interest-old
mailing list