I am trying the following experiment:
I have two QpushButtons
, say PushA
and PushB
. Now PushA
is in a QHBoxLayout
and PushB
is also in its own QHBoxLayout
. Both these horizontal layouts are in another QHBoxLayout
layout; lets call it HorizontalParentLayout
. Here is where the problem starts. HorizontalParentLayout
has a layout stretch factor of 1,4
and PushA
has a maximum width of 100
. When the HorizontalParentLayout
is stretched the horizontal layout hosting PushA
also grows whereas PushA
grows to a certain size (maximum size) then stops. If I continue expanding HorizontalParentLayout
the layout hosting PushA
continues growing. This is shown in the diagram below. The purple arrows show that the layout is growing whereas the widget Pushbutton
is fixed. I do not want this to happen. How can I make a layout section stop expanding once the widgets its hosting stops expanding two. This is what the image looks like
any suggestions would be appreciated.