Search code examples
pythonqtlayoutpyqtqt-designer

pyqt designer and layout for central widget


I started new clear Main Window project,

There are 4 Objects: MainWindow, centralWidget, menubar, and statusbar.

I need to set default layout inside the window, so probably for centralWidget.

But I didnt found way how to do it. I can get LayoutWidget with some particular size into centralWidget.

But I want to set layout for the whole centralWidget.


Solution

  • Right click anywhere within your centralWidget go to the Lay Out sub menu and select the Layout you want. This will be applied automatically to all contents of your centralWidget.

    In order to see how it works place inside it 2 or 3 push buttons and try changing the layouts.