How to do it...

Let's create an application that consists of two documents, and each document will be displayed via its individual subwindow. We will learn how to arrange and view these subwindows as desired:

  1. Launch Qt Designer and create a new Main Window application.
  2. Drag and drop a MdiArea widget onto the form.
  1. Right-click on the widget and select Add Subwindow from the context menu to add a subwindow to the MdiArea widget.

When the subwindow is added to the MdiArea widget, the widget appears as the dark background, as shown in the following screenshot:

  1. Let's, right-click again on the MdiArea widget and add one more subwindow to it. ...

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.