The BaseClass (QPushButton) calls the sizeHint() function. If you use debug messages in the overloaded functions you will see that the sizeHint() is called after the constructor. After the sizeHint() the other functions are called.

So when the size of my Pixmap is for example 250x130. then my button should also be the same size. To set the size of the button you could also write:
Qt Code:
  1. QSize MyButton::sizeHint() const {
  2. return QSize(250,130);
  3. //return normalButton.size();
  4. }
To copy to clipboard, switch view to plain text mode 
But within this function I haven't the pixmap when I can't set it within the constructor

I hope you could understand what i mean.

Regards
NoRulez