R – Filling the parent with Qt widgets

expandqt-designerqt4

I'd like to create an application's main window in qt4 designer.

When I add a layout element to the centralwidget, that element stays in the middle of the window and does not move when the window is resized. How can I make it "fill" the whole area (and resize its children properly)? All children widgets of my layout are expanding properly.

Best Answer

After you add the element, select the main window, and click one of the layouts (from the toolbar), so that it gets applied to the main window's children.

Related Topic