Vertical Layout
arranges the selected widgets vertically, in a column one below the other. In the following application, you will learn the process of laying widgets in a vertical layout.
In this application, we will prompt the user to enter a name and email address. The labels and textboxes for entering names and email addresses, along with the submit button, will be arranged vertically one below the other via Vertical Layout
. Here are the steps to create the application:
- Launch Qt Designer and create an application based on the
Dialog without Buttons
template, then add twoQLabel
, twoQlineEdit
, and oneQPushButton
widget to the form by dragging and dropping twoLabel
, twoLine Edit
, and onePush Button
widget onto the form. - Set the
text
property of the twoLabel
widgets toName
andEmail Address
. - Set the
text
property of thePush Button
widget toSubmit
. Because the purpose of this application is to understand the layout and nothing else, we won't be setting...