Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to build Visual Interface Development Environment in python Advanced Development

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article shows you how to build a visual interface development environment in the advanced development of python. The content is concise and easy to understand, which will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

I. Development thought

1. Using pycharm function integrated development tool, you can integrate qt suite.

two。 We use various library suites integrated in anaconda3 to build a visual development environment directly.

The visual development of 3.qt, the designer.exe of the tool in anaconda3, after this tool designs the interface, the generated file name extension is .ui

4. Using pyuic to code in python, this process is the process from qt code to python code. The transformation core here uses the library pyqt5.

Second, environmental construction

First, we have to convert the Chinese version of our pycharm into an English version.

What we need to do is to back up the Chinese version of the resource files, which is the English version by default.

Steps:

1. Find the pycharm icon on the desktop.

two。 Right open to the target location.

3. Locate the installation root of PyCharm.

4. Find the resources_cn.jar in the lib directory and add .bak at the end.

III. Extension tool settings in pycharm

Two projects that need to be expanded manually

Anaconda building

1. It is recommended to install to the regular program files folder.

two。 Be careful to check the check box during installation

3. If it's not checked. Please see the manual environment configuration.

Anaconda manual environment configuration

Find the environment variable (computer Properties-Advanced-Environment variable)

Add the following to the variable attribute path:

C:\ Program Files\ Anaconda3

C:\ Program Files\ Anaconda3\ Scripts

C:\ Program Files\ Anaconda3\ Library\ bin

After the construction is completed, call up the cmd command

Enter where python to find the directory of python

Enter conda list to list all anaconda commands

This means that the anaconda has been built successfully.

Qtdesigner settings (function: graphical design interface)

Project path:

C:\ Program Files\ Anaconda3\ Library\ bin\ designer.exe description:

This is the path of the interface design program, when we design the interface, we first call this running program.

Parameter: none

Working directory: $ProjectFileDir$

Description: this refers to the current project folder.

Pyuic settings (function: to change the image interface from qt version to python version)

1. Project path:

C:\ Program Files\ Anaconda3\ python.exe

Description: this is the compiler that compiles the py file

two。 Parameters:

-m PyQt5.uic.pyuic $FileName$-o $FileNameWithoutExtension$.py

Description: python in the use of compiling ui to call pyqt5 this library.

3. Working directory: $FileDir$

Description: represents the folder where the current compiled file is located.

IV. Summary and emphasis

Configuration and construction of 1.anaconda3 environment.

The construction of 2.pyqt5.

The above two extension environments are established in 3.pycharm.

4. Master the role of designer and pyuic.

The above content is how to build a visual interface development environment in the advanced development of python. Have you learned the knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report