See documentation notes of QApplication::setpalette.
Note: Some styles do not use the palette for all drawing, for
instance, if they make use of native theme engines. This is the case
for the Windows XP, Windows Vista, and Mac OS X styles.
So you can can check this by running application with different style, by starting your application from shell like this:
applicationToRun -style=windows
Or by using other styles, docs says: motif, windows and platinum, but this depends on installed Qt and its plugins.
Edit: ups I didn't noticed that you are setting style by code. Anyway verify that style you are enforcing is supported by Qt on current machine, check if
a.setStyle("cleanlooks");
returns a valid style (on errors it returns null). I would try all styles (list available form
QStyleFactory::keys()
).