Use layouts, then you don't have to do the children resizing by your own: QLayout, QGridLayout...