In this recipe, we will look at the .ui code we saved in the previous recipe when we saved our design in the Qt Designer tool. After that, we will use a utility we installed during the installation of the PyQt5 tools that will convert the ui code into Python py code.
We will be specifically using the pyuic5 tool. You can think of the name as follows:
Generate Python py code from the Designer ui code by converting it, using PyQt version 5.
If you are trying to find where pyuic5.exe is located, it actually gets installed into the Python scripts subfolder. On my installation, this is C:\Python37\Scripts\pyuic5.exe. Make sure your PATH is set to the Scripts folder in order to successfully run it.
Let's get ready.