What determines color of text shown as axis label?
Our plots draw just fine, except in some conditions the x and y axis labels, set with QwtPlot::setAxisTitle(), come out gray instead of black. I can't find anything anywhere in our source that sets colors for these, e.g. something resembling setAxisTitleColor(GRAY) to explain this phenomenon. Why they are black most of the time, I assume is some built-in default of Qwt.
In order to fix our app, it'd be nice to write a line like setAxisTitleColor(BLACK) in the right place to force these labels to always be black. But there doesn't seem to be any such thing defined by Qwt. How to proceed? What does determine the label colors?
Re: What determines color of text shown as axis label?
Each QwtText object can have its individual color - if no color has been explicitely assigned the color is usually somehow taken from the widget palette where the QwtText object belongs to.
In case of the title of a QwtScaleWidget it is scaleWidget->palette().color( QPalette::Text ). The tick labels are also painted with QPalette::Text, while ticks and the backbone of the axis are painted with QPalette::WindowText.
Because of Qt3 compatibility Qwt 5.x uses the old names for these roles - check the code.
Uwe
PS: Note, that Qwt is open source. It is allowed to look into the code.