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:

  1. Let's create an application based on the Dialog without Buttons template and add two QLabel, two QlineEdit, and one QPushButton widget to the form by dragging and dropping two Label, two Line Edit, and a Push Button widget on the form.
  2. Set the text property of the two Label widgets to Name and Email Address.
  3. Also, set the text property of the Push Button widget to Submit.
  4. As the purpose of this application is to understand the layout and nothing else, we won't ...

Get Python GUI Programming - A Complete Reference Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.