Hello @applefier ,
To fix the size of your layout you can use
the setSizeConstraint ( SizeConstraint ) function
and you have to put QLayout::SetFixedSize as arg of SizeConstraint
Here is the doc explanation:
sizeConstraint : SizeConstraint
This property holds the resize mode of the layout.
enum QLayout::SizeConstraint
The possible values are:
Constant Value Description
QLayout::SetDefaultConstraint 0 The main widget's minimum size is set to minimumSize(), unless the widget already has a minimum size.
QLayout::SetFixedSize 3 The main widget's size is set to sizeHint(); it cannot be resized at all.
QLayout::SetMinimumSize 2 The main widget's minimum size is set to minimumSize(); it cannot be smaller.
QLayout::SetMaximumSize 4 The main widget's maximum size is set to maximumSize(); it cannot be larger.
QLayout::SetMinAndMaxSize 5 The main widget's minimum size is set to minimumSize() and its maximum size is set to maximumSize().
QLayout::SetNoConstraint 1 The widget is not constrained.
Hope this will work,
Regards !