How to do it...

Let's make a small sign-in form in the Dock widget that will prompt the user for their email address and password. Being dockable, this sign-in form can be moved anywhere on the screen and can be made floatable. Here are the steps to create this application:

  1. Launch Qt Designer and create a new Main Window application.
  2. Drag and drop a Dock widget onto the form.
  3. Drag and drop the widgets that you want to be available in dock areas or as floating windows in the Dock widget.
  4. Drag and drop three Label widgets, two Line Edit widgets, and a Push Button widget on the Dock widget.
  5. Set the text property of the three Label widgets to Sign In, Email Address, and Password.
  6. Set the text property of the Push Button widget to Sign In.

Get Qt5 Python GUI Programming Cookbook 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.