Python + PyQt5 + QtDesigner + PyUic + PyRcc environment Installation and Configuration

tags: python

Python + PyQt5 + QtDesigner + PyUic + PyRcc environment Installation and Configuration


as a never just write the code, not the UI white, if not the boss suddenly came inexplicably request, I will not go Zuosha Zi-style UI. (Functional on the line, to wisdom like goods.) With this in mind I, at the time of first contact with UI, it was forced to rip Gauss. Python + PyQt5 + QtDesigner + PyUic + PyRcc, Huo, five things which you know a Python. After some information in order to understand clearly the Baidu search. PyQt5, with its python code after knocking can be able to UI design; QtDesigner also used to make the UI, but is directly carried out by the Qt UI design language, while also supports drag and drop UI design. PyUic, is used to QtDesigner a code into Python code; last PyRcc, is packaged pictures, data files, resource files into py. In fact, when I was just beginning to configure the Python + PyQt directly to the start line and UI. But it only took a morning out of the whole interface components are, but really could not stand layout. Finally, some agonizing only to find that Python + PyQt5 + QtDesigner + PyUic + PyRcc.

Download and install

It should be installed, in fact, of a total of three: python, PyQt, and QtDesigner.

  • python (This does not explain, tutorials so many, myself Baidu)
  • PyQt :pip install PyQt5 -i https://pypi.douban.com/simple
  • QtDesigner:pip install PyQt5-tools -i https://pypi.douban.com/simple
    (the beginning I was crazy pip install QtDesigner ... however it hidden in PyQt
    5-tools inside)

Configuration

Configuration PyQt5

PyQt5 is the need to configure the environment variables. Otherwise, direct import into the last 99% of the error is: no Qt platform plugin could be initialized.balabala ... this sentence is back out, N error many times today! ! !

Configuration:
variable name: QT_QPA_PLATFORM_PLUGIN_PATH
variable values:D:\python3\Lib\site-packages\PySide2\plugins\platforms
(D: \ python3 my python installation directory, this must replace their installation directory ha)

Configuration QtDesigner

just look at the picture.

Step: "File" Settings "external tool" click (+) was added

specific settings:

  • program:D:\python3\Lib\site-packages\pyqt5_tools\Qt\bin\designer.exe
  • Working Directory:D:\python3\Lib\site-packages\pyqt5_tools\Qt\bin
    (D: \ python3 my python installation directory, this must replace their installation directory ha)

Configuration pyuic

The role of pyuic: QtDesigner document design ui interface is .ui suffix. In python, need to be converted into a .py suffix to use. pyuic is to achieve this functionality.

specific configuration:

  • program:D:\python3\Scripts\pyuic5.exe
  • Argument:-m PyQt5.uic.pyuic $FileName$ -o $ FileNameWithoutExtension$ .py -x
  • Working Directory:$FileDir$
    (D: \ python3 my python installation directory, this must replace their installation directory ha)

Configuration pyrcc

The role of pyrcc: QtDesigner managed resource files (pictures, data files) are managed by .qrc file. pyQt generated application, reference picture is usually the resource files installed for the python file, and then reference the resource file, but can not load the resource files directly. The pyrcc is to be converted into .qrc file .py file.
For loading PyQt resource files, reference may be"Pyqt load a resource file"


specific configuration:

  • program:D:\python3\Scripts\pyrcc5.exe
  • Argument:$FileName$ -o $FileNameWithoutExtension$_rc.py
  • Working Directory:$FileDir$
    (D: \ python3 my python installation directory, this must replace their installation directory ha)

Intelligent Recommendation

PYQT5 pycharm configuration Qtdesigner Pyuic

First, configure qtdesigner (QT UI design) Open the setting interface 2. Choose an outreach tool 3. Add Qtdesigner Tool Name is generally taken QtDesigner Program: Designer.exe path Path needs to set ...

Configure pyqt-tools in pycharm (QtDesigner, PyUIC, Pyrcc)

pyqt4-tools configuration: pyqt5-tools configuration: note: 1. The pyrcc configuration is missing in the pyqt4 tutorial, you can refer to the pyqt5 tutorial, the parameters are the same, that is, the ...

Pyqt5 installation and qtdesigner configuration

1. Install pyqt5 (use Tsinghua source faster, install several times if it fails once) pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pyqt5 2. Install pyqt5-tools (install several times if it ...

PYCHARM installation configuration new version Qt Designer, Pyuic, Pyrcc Tutorial

Qt Designer: Tools for Designing QT Interface Pyuic: Convert QT interface to .py code Pyrcc: Convert the resource file (.qrc file) into a .py file and introduced in the main program First, download PY...

[GUI] Win10 installation PYQT5 + QT Designer + Pyuic environment configuration

System:Windows 10 IDE:PyCharm I. Install PYQT5 Enter the following code at the terminal: Second. Install Qt Designer 3. Configuring Pycharm File -> settings -> Tools -> External Tools -> &...

More Recommendation

Configure pyqt5.designer, pyuic, pyrcc in Pycharm

1 Prerequisites Install pyqt5 and pyqt5-tools Method: Install pyqt5 pip install PyQt5 -i https://pypi.douban.com/simple Install pyqt5-tools pip install PyQt5-tools -i https://pypi.douban.com/simple 2 ...

pycharm Pyqt5 Designer Pyuic Pyrcc Settings

PyQt5 Designer PyUIC PyRCC python3.9 pycharm Designer designer.exe path is: %Python%\Lib\site-packages\qt5_applications\Qt\bin External Tools setting: Program: C:\Program Files\Python39\Lib\site-packa...

Installation of QTdesigner and pyUIC

Installation of QTdesigner and pyUIC If it fails to start after installation, change to another installation version Configure pycharm file >> Settings >> Tools >> External Tool Clic...

Qtdesigner + Pyuic configuration

QTdesigner+PyUIC QtDesigner pip install pyqt5 pip install pyqt-tools program:D:\ProgramData\Anaconda3\envs\pytorch\Scripts\designer.exe Arguments: Working directory:D:\ProgramData\Anaconda3\envs\pytor...

PYQT5 + QTDesigner, Pycharm Environment Configuration

PYQT5 + QTDesigner, Pycharm Environment Configuration Download PYQT5 and PyQt5-Tools Configuring Pycharm Configuring qtdesigner Configuring Pyuic test Download PYQT5 and PyQt5-Tools Download using PIP...

Copyright  DMCA © 2018-2026 - All Rights Reserved - www.programmersought.com  User Notice

Top