You probably need to use QPalette::Active colourgroup.