i) not related to your problem, but: a global returnMainLayout() is a bad idea: what if you want two instances of that widget?
ii) you should not set the maximumSize of your widget.
now, the available space is quite limited and the layout tries to fit all the widgets into that (too small) space.
Bookmarks