[PyQt] PyQt, QSVGWidget background color

Matt Smith melkor at orangepalantir.org
Wed Nov 5 12:48:18 GMT 2008


Ammendium,

The suggested:

pal.setColor(QPalette.Window,QColor('white'))

Has the desired effect on a TabWidget, so I think what is happening is
that a widget doesn't paint its own background if it is in another
widget.  By setting widget.window(), it will go find the widget that
does paint the background (in my case the main window) and make the
change?

obvious solution.

widget.setAutoFillBackground(True)

thus it paints its own background.

thanks for the help
mbs



More information about the PyQt mailing list