Using Vertical Layout
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.
How to do it...
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 Buttonstemplate, then add twoQLabel, twoQlineEdit, and oneQPushButtonwidget to the form by dragging and dropping twoLabel, twoLine Edit, and onePush Buttonwidget onto the form. - Set the
textproperty of the twoLabelwidgets toNameandEmail Address. - Set the
textproperty of thePush Buttonwidget toSubmit. Because the purpose of this application is to understand the layout and nothing else, we won't be setting...