How to do it...

In this application, we will make two columns, one for displaying messages and the other column for accepting input from the user. Besides two pairs of Label and Line Edit widgets for taking input from the user, the application will have two buttons that will also be arranged in the form layout. Here are the steps to create an application that arranges widgets using Form Layout:

  1. Launch Qt Designer and create an application based on the Dialog without Buttons template, then add two QLabel, two QLineEdit, and two QPushButton widgets to the form by dragging and dropping two Label, two Line Edit, and two PushButton widgets on the form.
  2. Set the text property of the two Label widgets to Name and Email Address.
  3. Set the text property ...

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

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.