What is main widget in the context of QLayout::SizeConstraint?
-
The description of the QLayout::SizeConstraint (https://doc.qt.io/qt-6/qlayout.html#SizeConstraint-enum) says "main widget" but nowhere explains what main means. Is main widget the widget for which the layout is applied, or the biggest widget in the layout, or what?
-
The description of the QLayout::SizeConstraint (https://doc.qt.io/qt-6/qlayout.html#SizeConstraint-enum) says "main widget" but nowhere explains what main means. Is main widget the widget for which the layout is applied, or the biggest widget in the layout, or what?
-
Is it so hard question that nobody knows the answer? I thought it is a question about a basic thing. Interesting.
"Main widget" could mean the main widget area without additional things around it like borders (
QFrame
) or whatever... but I'm not 100% sure. -
I am not sure either :) A layout can, of course, have more than one child widget placed on it. But the layout is applied to the widget it is on. Maybe that is what they mean by "main".
For now, ignore the wording, and test the behaviour!
I'm not sure why there is 'main' - maybe to emphasise that it does not affect the children of the widget.