Set minimum view width/height in a layout

Hi everyone,
I am trying to implement a custom layout very similar to SlicerLayoutFourUpQuantitativeView.
However, I would like to set a minimum width/height to views so that when the user stretches one views others do not disappear.
Is there already something existing to do that ?

Thanks in advance,
Cheers

Pierre

Probably not possible as of now

The proper solution would be to add attributes for this in CTK (in ctkLayoutManager). But if you have never used C++ then you can work around this in Python by looking up the widget using slicer.util.findChildren and adjusting sizing properties.

Thanks Andras,
Do you know if there is a way to fix the size at layout creation
I tried to use verticalStretch="0" horizontalStretch="0" but it was not working

<item splitSize="300">"
" <view class="vtkMRMLViewNode" singletontag="1" verticalStretch="0" horizontalStretch="0">"
" <property name="viewlabel" action="default">1"

There are no such properties implemented in ctkLayoutManager as verticalStretch and horizontalStretch. You can search for .attribute in the file to see what properties are available. You can modify this file to add support for more attributes.

This is probably a small issue but in Slicer/vtkMRMLLayoutLogic.cxx at 81ff76b24d4913dbd992b7eed4d77805f306ffe8 · Slicer/Slicer · GitHub, verticalStretch is defined