Set maximum module width and other layout options

Slicer 4.10.2

I’m writing a scriptable module, and by default the width of the module is too large and it takes up too much of the screen on my laptop. Is there a way to set the overall maximum layout for the complete module, or at least the default width when the module is first initialized?

Also, where can I look up other layout options for the module (for example vertical/horizontal white spacing, centering widgets, etc) ? Thanks

There is no Slicer-specific API for size management, everything is controlled by Qt size policies that you set on your widgets.

Could you point me to the Qt widget documentation? For example, how do I set white space in the slicer module, etc?

See qWidget::size Policy. White space may be added by changing margins or adding spacer widgets.