How to install QtDesigner?

好久不见. 提交于 2020-12-27 08:24:19

问题


I just installed Qt 5.4.1 on Windows 7. And there is no QtDesigner. Also there is no QtDesigner in MaintenanceTool.
How can I install it?


回答1:


You can install and find QT Designer as follows (Windows environment):

  • Install latest QT (I'm using 5.8) from QT main site
  • Make sure you include "Qt 5.8 MinGW" component
  • QT Designer will be installed in C:\Qt\5.8\mingw53_32\bin\designer.exe
  • Note that the executable is named "designer.exe"

UPDATE - there is an easier way to install QT Designer without downloading GB's of data from QT:

  • Install the latest version of "pyqt5-tools" using pip install pyqt5-tools --pre

  • The "designer.exe" will be installed in ...Lib\site-packages\pyqt5_tools




回答2:


If you are on macOS and use brew you may have installed qt already using brews installer.

In that case you already have QT Designer installed even though it is not mentioned anywhere.

You can find it here: /usr/local/Cellar/qt/<qtversion>/libexec/Designer.app

So to place it in your local apps folder you can create a symlink to it like this:

ln -sf /usr/local/Cellar/qt/5.11.1/libexec/Designer.app ~/Applications/.



回答3:


install designer using apt package manager

sudo apt-get install python-qt4 qt4-designer

run the command designer and it will work for you

if it doesn't try /usr/bin/designer

it worked for me i am using python 3.6 with pyqt-5.16




回答4:


It is there. Create a form, click on the .ui file and it opens automatically.




回答5:


Install the latest version of "pyqt5-tools" using pip install pyqt5-tools --pre

Then run the command (designer.exe) then you are good




回答6:


Expanding StonyBoy answer. If you are on macOS, you have installed Qt5 with brew, and you want to access the Qt5 Designer app via command line (like on Linux), you can set a symlink to the actual executable as well, like this:

ln -sf /usr/local/Cellar/qt/5.13.1/libexec/Designer.app/Contents/MacOS/Designer /usr/local/opt/qt/bin/designer

This way, the designer command will be placed in the bin folder, together with the other Qt5 executables (as qmake). Thus, you will be able to launch it simply by typing designer in your shell.


Note: of course you must have the path of the Qt5 bin/ folder added to your PATH environmental variable, for being able to directly call designer in the shell. But brew added it for you when you installed Qt5.



来源:https://stackoverflow.com/questions/30222572/how-to-install-qtdesigner

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!