Implement a proxy style and modify the palette before the actual painting routines are called. Alternatively you can go through all widgets of the application and apply the palette manualy, but it's not a good solution. In Qt4 you could simply use stylesheets instead of all that...
Please make sure the situation is really caused by Qt and not by some error in your code before applying my suggestions. Test it on the simplest code possible. The problem might be completely different than you think (you might be using wrong colour roles for instance).
Bookmarks