Size constraint is an attribute of a layout, not of the widget. I think it would be nice to be able to have such a property in designer just like we have margin and spacing available, but let's face it - how often do you set a size constraint on a layout?
You can't set a new layout for a main window.You can always break the layout and set another one.
No. Layout manages children, not parents. Period. What would happen if you'd wrap a widget with a layout and children into another layout? Which layout should be responsible for managing the size? Besides, you have to have something "fixed" at some point, otherwise you couldn't use size policies as any widget with "expanding" size policy would cause the top level widget to expand to screen width/height.
Why not? I used a QMainWindow as a child widget a few times...A QMainWindow never has a parent widget,
The window manager is its controller as it is a child of the root window of your screen.but is in need of a size-controller. Ergo it should use the first child size-controller it finds.
Designer uses a generic way of managing properties. If you wanted to hide properties which were unusable for top-level widgets, you'd have to have a way of marking any property as such and there would be a problem if you wanted to place one form inside another as the widget which was designed as a top-level widget might in the end be a child of some other widget.
You should never modify Designer generated files by hand.Finally, I presume you did the corrections you did using a text editor and not Designer, right?
Bookmarks