Thanks a lot ! Ebrahim
It works! I noticed that you are actually changing the panel on the left in order to resize the display area so it changes the width.However do you think it possible to change the height? Maybe I need to change the Python Interactor window height in order to change the display area height?
However do you think it possible to change the height? Maybe I need to change the Python Interactor window height in order to change the display area height?
You can change the python interactor height in a similar way
The display area whose size you are trying to manipulate can be accessed as slicer.util.mainWindow().centralWidget(). Depending on what you’re trying to do exactly, you might want to play with its size policy and resize it. Or maybe insert some spacers around it.
It’s not that simple I think. The central widget size is determined according to its size policy, which you can check with slicer.util.mainWindow().centralWidget().sizePolicy. So it might be expanding to fill the space given to it within its layout, and in that case you’d have to control its size indirectly as I’ve described. You can also try change the size policy, or change the min/max sizes to get different effects. I’m not sure what effect you’re trying to get exactly.
resizeDocks was used in the case of resizing the python console and module panel dock widgets-- that’s because those are QDockWidgets, which are special. The central widget is not a QDockWidget so it is treated differently.