AHA!!!!
Reading the documentation more closely (yes, shame on me the first time...) reveals the following important tidbit for QWidgets and StyleSheets:
If you subclass from
QWidget, you need to provide a paintEvent for your custom
QWidget as below:
void CustomWidget::paintEvent(QPaintEvent *)
{
QStyleOption opt;
opt.init(this);
QPainter p(this);
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
}
Adding this to my paintEvent fixed the problem.
It's interesting you say that style sheets are unreliable: can you give me some examples as to when? It seems like they're the only solution for cross-windows-manager graphics. We've had document-able issues with QPalette. And can you point me to where you found out they were very slow?
I'm not trying to doubt you at all: I just want to wrap my head around this before I take the plunge.
Thanks!