That sorted it, thanks a lot. I'd only read the QWidget paintEvent documentation. It didn't occur to me that it would be subclassed halfway through the system like that.