Hello,
I wrote a class following the letter-envelop idiom:
http://en.wikibooks.org/wiki/More_C+...nvelope_Letter
where the class is derived from QWidget and contains a letter class of QWidget*. I need this class as a base class for several other widgets like mylabel, mycheckbox. I created a sizeHint method like this:

QSize my_label::sizeHint () const {
return ((QLabel*)letter)->sizeHint();
}

This works so far, but one problem is unsolved: the labels are rendered using the minimum size, leaving different amount of white space at the right side. I want them to fill the space in the layout with the background color, as it did when I used plain QLabel widgets. What would be the right approach?
Eggert