A picture is attached, rather than including all the XML code for the custom layout. I didn’t see any property tags that set the initial size of the slice widgets.
What I’d like to do is make the height of L1 twice the height of L2, without having to manually adjust the slider between them. However, it seems that packing the MRML widget happens after the line where I set the dimensions.
How do I change the size of slice widgets within a layout from a script, or alternatively, specify relative size in XML property tags?
Thanks for any assistance.
You cannot specify size hints in the XML, but it would be certainly very useful to add that. The relevant code is here.
Alternatively, you can use grid layouts and with row and column spans you may be able to get the view sizes you need. Also, you may try to access widgets and set size policies (you can access the widgets by slicer.app.layoutManager().sliceWidget(name) and slicer.app.layoutManager().threeDWidget(n)).
Thanks, I’d forgotten that the slice and threeD widgets inherit from QWidget, so their size policies can be changed. I can adjust the initial size that way.
Thanks again,