If you were correctly using a Qt layout inside the frame then the frame would drive the size of the contained widget within the constraints imposed on the layout and widget. Regardless of the original size of the QFrame once you add it to a larger layout its size will be controlled by that layout.
Qt does not, as a rule, operate in the content-drives-container-size direction because size constraints naturally flow down from the available desktop space, to the uppermost window and down to smaller and smaler widgets.
Bookmarks