If you receive an error saying “No module named ‘whatever'” then probably PyQt5 was not installed properly or the site-packages directory containing PyQt5 is not in your PATH. If you receive an error saying “ImportError: DLL load failed: The specified procedure could not be found.”, it could be that you installed a version of PyQt that is not compatible with your version of Python For example: installing 32-bit PyQt and 64-bit python, or installing Python 3.5 and the version of PyQt made for Python 3.4. Note: the PyQt installer names what it supports in the filename, for instance “PyQt5-5.4.1-gpl- P圓.4-Qt5.4.1- 圆4.exe” is for Python 3.4 64-bit. Loading and Running a GUI in Python via PyQt Other possible solutions to the DLL error can be found here.Īll set? Lets move on to making our first GUI. Most PyQt tutorials will have you create a GUI first then load it into Python. I’m going to build up the steps in reverse order: first I’ll give you an already made GUI, ensure that you can run it in Python, then have you create your own and run it in Python. The complete process is summarized in the picture below. I will first explain the steps labelled CONVERT, CODE, and EXECUTE. To begin, I have already designed a GUI and saved it as firstgui.ui, which you can download from: link here.
0 Comments
Leave a Reply. |