In the previous lesson, we learned to install PyQt5, now we need to convert the UI file that PyQt Designer generates into a file with the PY extension.

It should be noted that pyqt5 must be installed on python 3.6, since pyqt has not yet been added for version 3.7.

As a result of this, the environment variables «path» must be for python version 3.6 and the code that will work for this window must also be version 3.6.

After you have created your window and saved it in one of the folders, you need to open the command line in this folder and write it

python -m PyQt5.uic.pyuic -x test.ui -o test.py, where test.ui is the source file and test.py is the result of the conversion.

Converting ui to py can be done using the bat-file, which you put in the same folder in which you have the ui-file, and write the same lines that were mentioned above.