Using Horizontal Layout
A horizontal layout arranges widgets next to each other in a row that is, widgets are horizontally aligned using Horizontal Layout. Let's understand this concept by making an application.
How to do it...
In this application, we will prompt the user to enter an email address and password. The main focus of this recipe is to understand how two pairs of the Label and Line Edit widgets are horizontally aligned. Here is the step-by-step procedure to create this application:
- Let's create an application based on the
Dialog without Buttonstemplate and add twoQLabel, twoQlineEdit, and oneQPushButtonwidget to the form by dragging and dropping twoLabel, twoLine Edit, and aPush Buttonwidget on the form. - Set the
textproperty of the twoLabelwidgets toNameandEmail Address. - Also, set the
textproperty of thePush Buttonwidget toSubmit. - As the purpose of this application is to understand the layout and nothing else, we won't be setting the
objectNameproperty of any of...