Ubuntu16.04+pycharm+pyqt5 installation and configuration

I used to use python+pyqt5 to develop together under windows. Today, I installed pyqt5 on ubuntu16.04 and configured it with pycharm.

The installation process of pycharm is skipped directly. This article mainly talks about the installation of pyqt5 and the configuration with pycharm.

There are two installation instructions as follows:

sudo apt-get install qt5-default
sudo apt-get install qttools5-dev-tools

ok, pyqt5 installation is complete! Next, configure it in pycharm (open qtdesigner directly through pycharm and convert the ui file into a py file).

After opening pycharm, click File -> setting -> Tools -> External Tools, click the + sign to add two files.

(1) The first is that QtDesign is used to directly start QtDesigner through pycharm, and customize parameters such as Name, Grop, etc.

/usr/bin/designer # Fill in Program
$FileDir$ # Fill in the Working directory


(2) The second is to convert the ui file into a py file,

/usr/bin/python3 # Fill in Program
-m PyQt5.uic.pyuic $FileName$ -o $FileNameWithoutExtension$.py # Fill in Arguments
$FileDir$ # Fill in the Working direction


Once set up, you can use it directly in pycharm!

You can see the two tools just defined in the drop-down menu Tools in pycharm, and click QtDesigner to open the interface design box directly.


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325460362&siteId=291194637