PyQt5 - HOW to start the designer

て烟熏妆下的殇ゞ 提交于 2019-11-28 23:06:17

The latest PyQt5 wheels (which can be installed via pip) only contain what's necessary for running applications, and don't include the dev tools. This applies to PyQt versions 5.7 and later. For PyQt versions 5.6 and earlier, there are binary packages for Windows that also include the dev tools, and these are still available at sourceforge. The maintainer of PyQt does not plan on making any further releases of such binary packages, though - only the runtime wheels will now be made available, and there will be no official wheels for the dev tools.

In light of this, someone has created an unofficial pyqt5-tools wheel (for Windows only). This appears to be in it's early stages, though, and so may not keep up with recent PyQt5 releases. This means that it may not always be possible to install it via pip. If that is the case, as a work-around, the wheel files can be treated as zip files and the contents extracted to a suitable location. This should then allow you to run the designer.exe file that is in the pyqt5-tools/designer folder.

Finally, note that you will also see some zip and tar.gz files at sourceforge for PyQt5. These only contain the source code, though, so will be no use to you unless you intend to compile PyQt5 yourself. And just to be clear: compiling from source still would not give you all the Qt dev tools. If you go down that route, you would need to install the whole Qt development kit separately as well (which would then get you the dev tools).

The Qt designer is not installed with the pip installation.

You can either download the full download from sourceforge (probably won't be the last pyqt release, and might be buggy on presence of another installation, like yours) or install it with another (unofficial) pypi package - pyqt5-tools (pip install pyqt5-tools), then run the designer from the following subpath of your python directory -

...\Python36\Lib\site-packages\pyqt5-tools\designer\designer.exe

I struggled with this as well. The pyqt5-tools approach is cumbersome so I created a standalone installer for Qt Designer. It's only 40 MB. Maybe you will find it useful!

Sairaj Das
pip install pyqt5-tools

Then restart the cmd, just type "designer" and press enter.

M Pavan Kumar

Try using:

pip install pyqt5-tools

Now you'd find the designer in site-packages/pyqt5-tools.

akej74

You can also install Qt Designer the following way:

  1. Install latest Qt (I'm using 5.8) from Qt main site
  2. Make sure you include "Qt 5.8 MinGW" component
  3. Qt Designer will be installed in C:\Qt\5.8\mingw53_32\bin\designer.exe
  4. Note that the executable is named "designer.exe"
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!