Now if only I could read ALL the documentation!

If you subclass from QWidget, you need to provide a paintEvent for your custom QWidget as below:

Qt Code:
  1. void CustomWidget::paintEvent(QPaintEvent *)
  2. {
  3. opt.init(this);
  4. QPainter p(this);
  5. style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
  6. }
To copy to clipboard, switch view to plain text mode 

It works fine now...