In this recipe, we will be writing our first PyQt5 GUI. We will be using PyQt5 directly without using the Designer.
Writing our first PyQt5 GUI
Getting ready
You need to have PyQt5 installed. See the Installing PyQt5 recipe to find out how to install PyQt5. Use your favorite Python editor to write the code. If you are not familiar with modern IDEs such as Eclipse, PyCharm, and so on, you can use the IDLE editor, which ships with Python.
How to do it...
Let's look at how we can build our first GUI with PyQt5:
- Open your favorite Python editor.
- Create a new Python module...