Don't forget setAutoFillBackground(true) if you change the background color in palette. Without that property, your widget will not draw its background.