It depends on the contents of the frame. If it has no contents then layout is not required but you need to manually fix the size of the frame to something constant using QWidget::setFixedSize.
A layout of a widget is inside the widget not outside it. The main window is a floating window so it's not "in" a layout (as it would need to have a parent).As far as I known, QMainWindow has its default layout management, why did you say that it's not inside a layout?
Size policy is a set of rules that are used by a layout controlling the current widget to determine how much space to give to each widget controlled by the layout. Layout controlls the widgets that are in the layout, not the one the layout is in (the parent). If a particular widget (like your main window) is not part of some layout, its size policy and its size hint are ignored. The exception is that size hint of a window is used to determine the initial size of this window.Could you please explain it little more or refer me to something to read?






Reply With Quote
Bookmarks