If you want to track the size hint of the contained widget always then look at the Fixed policy on the main window and a SetFixedSize on the layout of the contained widget. The Extension Example in the Qt docs might also help.