We will add a button and a label to our UI design. We will also use the Designer to connect the two, creating some of the available functionality directly within the Designer. Let's take a look at the steps:
- In the Designer, open Designer_Second_UI_layout.ui and save it as Designer_Second_UI_layout_button.ui.
- Drag a PushButton from the left-hand side into the lower horizontal layout:
Note how the button automatically adjusts itself to the left and right edges of the horizontal layout.
- Save and preview the UI. Click the button during the preview run of the UI:
When clicking it, the button looks pressed in and comes with ...