I am trying to change the background color of a QPushButton on a windows XP machine using Qt4.3. I have tried multiple suggestions found in the forums:
Qt Code:
  1. QPushButton *tmpButton = (QPushButton*)sender( );
  2.  
  3. QPalette pal = tmpButton->palette( );
  4. pal.setColor( QPalette::Button, color );
  5.  
  6. tmpButton->setPalette( pal );
  7. tmpButton->setAutoFillBackground( true );
To copy to clipboard, switch view to plain text mode 

Qt Code:
  1. QPushButton *tmpButton = (QPushButton*)sender( );
  2.  
  3. QPalette pal = tmpButton->palette( );
  4.  
  5. pal.setColor( QPalette::Active, QPalette::Button, color );
  6. pal.setColor( QPalette::Inactive, QPalette::Button, color );
  7. tmpButton ->setPalette( pal );
To copy to clipboard, switch view to plain text mode 

Both instances just result in the button staying the same color, but just a thin colored boarder around the edges of the button. This same code works fine in Solaris and Linux, but not Windows. The main difference is that the top code was from Qt4.1 and the bottom code is from Qt3.3, but both still worked changed just the boarder in 4.3. Is there something I am missing in Windows?

Thanks!