[PyQt] how to set a widget background?

Giovanni Bajo rasky at develer.com
Mon Aug 6 09:54:56 BST 2007


On lun, 2007-08-06 at 10:13 +0800, Marco wrote:

> Hi,
>   I write a widget from QWidget, and I want to change its backgound, I
> change it via rewrite paintEvent, but it got my computer slowly. Is
> there better method to change a widget backgourd?

widget.setStyleSheet("QWidget { background: FF00AA }")
-- 
Giovanni Bajo



More information about the PyQt mailing list