Select the MainWindow top-level item in the object tree and click on , the Lay Out Vertically icon in the upper toolbar. The button, labels, and the empty widget will be automatically resized to take all the available space of the form in the central area:
If the items were arranged in a different order, you can drag and drop them to change the order.
Run the application and check that the window's contents are automatically positioned and resized to use all the available space when the window is ...