Now that we have seen how to inherit from PyQt5 classes, in this recipe, we will inherit from QMainWindow. This gives us more options when it comes to designing our GUI compared to inheriting from QWidgets. In addition to setting the GUI window title, we will also give it a certain size.
Inheriting from QMainWindow
Getting ready
Read through the previous recipe so that you understand the code we are writing here.
How to do it...
We will inherit from QMainWindow and specify the size of the GUI. Let's get started:
- Create a new module and name it GUI_PyQt5_QMainWindow...