Thanks Jacek,

but not the answer I was looking for at te moment.

The solution to the problem at hand: put an label behind the button.
In Qt4 it's not posible anymore to put an image on an button. Only labels.
So label behind button, alpha of the button to 0.

Qt Code:
  1. label = new QLabel("label", this);
  2. label->setGeometry( QRect( 0, 0, 50, 50 ) );
  3. label->setText("");
  4.  
  5. but = new QPushButton("but", this);
  6. but->setGeometry( QRect( 0, 0, 50, 50 ) );
  7. but->setCheckable(true);
  8. but->setFont(QFont("Bitstream Vera Sans",22,QFont::Bold));
  9. but->setFlat(true);
  10.  
  11. e = new QLineEdit("e", this);
  12. e->setGeometry( QRect( 5, 5, 40, 10 ) );
  13. QFont e_font( e->font() );
  14. e_font.setPointSize( 10 );
  15. e->setFont( e_font );
  16. e->setFrame( FALSE );
  17.  
  18. resize( QSize(50, 50).expandedTo(minimumSizeHint()) );
  19. connect( but, SIGNAL(clicked()), SLOT(butClick()) );
  20. init();
  21.  
  22. }
  23.  
  24. knop::~knop(){}
  25.  
  26. void knop::init()
  27. {
  28. pWit.load("/home/bartv/progs/sudoku/include/knopWit.png");
  29. pRood.load("/home/bartv/progs/sudoku/include/knopRood.png");
  30. pGroen.load("/home/bartv/progs/sudoku/include/knopGroen.png");
  31.  
  32.  
  33. palWit.setColor(QPalette::Base,QColor(255,255,255));
  34. palWit.setColor(QPalette::Button,QColor(255,255,255,0));
  35.  
  36. palRood.setColor(QPalette::Base,QColor(255,0,0));
  37.  
  38. palGroen.setColor(QPalette::Base,QColor(0,255,0));
  39.  
  40. palClick.setColor(QPalette::Base,QColor(150,150,150));
  41. palClick.setColor(QPalette::Button,QColor(150,150,150,255));
  42.  
  43. label->setPixmap(pWit);
  44. but->setPalette(palWit);
  45. e->setPalette(palWit);
To copy to clipboard, switch view to plain text mode 

Cheers,
Bart.