[PyQt] unsetPalette function in qt4?

Phil Thompson phil at riverbankcomputing.co.uk
Wed Sep 12 09:15:44 BST 2007


On Wednesday 12 September 2007, Peter Shinners wrote:
> Is there an equivalent to the QWidget.unsetPalette() method in Qt4. In
> Qt3 this is used to tell a QWidget to inherit its parent palette.
>
> Perhaps a way using the property methods of QObject?
>
> We are using this to temporarily set widgets with an error to a
> different color. When the error goes away we want to unset the local
> palette.

Possibly...

    w.setAttribute(QtCore.Qt.WA_SetPalette, False)

...though I've never tried it.

Phil


More information about the PyQt mailing list