Development Tools
VSCode
A brief discussion on how to build and configure the PyQt5 environment in VSCodeA brief discussion on how to build and configure the PyQt5 environment in VSCode
How to build and configure the PyQt5 environment in
VSCode? The following article will introduce to you the installation of the PyQt5 toolkit and the method of configuring the PyQt5 environment in VSCode. I hope it will be helpful to friends in need!

Record the process of setting up the environment when learning QT. As far as I know, there is a python version and a C version for QT interface programming. The one I chose here is the python version of PyQt5
1. PyQt5 toolkit installation
is already installed by default. Python environment
Use the pip command to install the PyQt5 tool——pip install pyqt5
Then install the development tool QT designer——pip install pyqt5- tools
The installation path is \Lib\site-packages under your python installation path
Find the pyqt5designer.exe file under this path

This is the Qt Designer graphical interface development tool. You can choose to generate a shortcut to the desktop, and then double-click it to use it.
2. Visual Studio Code configuration
Visual Studio Code only requires two steps. [Recommended learning: "vscode introductory tutorial"]
-
Download and install the plug-in PYQT integration

-
Set the path of pyqt5designer.exe as the default opening location
Click the gear in the lower left corner to open the settings, search for pyqt directly, open the PYQT integration configuration in the extension, and find Pyqt integration Pyuic: Cmd As well as the two options of Pyqt integration Qtdesigner Path, just add the absolute path of the previous pyqt5designer.exe (I moved it to another location here)


3. Using PyQt5 in Visual Studio Code
You can directly use pyqt5designer for layout, or code your own code for design.
-
Using pyqt5designer: You can directly double-click pyqt5designer.exe to open the development tool (if you have generated a shortcut before)
In order to keep the desktop clean, I did not generate it, but To use the plug-in you just installed, you can quickly open the development interface by right-clicking PYQT: new form in the file bar on the left




- Type the code directly: I first learned the basic use and layout of controls from other bloggers I coded all the code manually. It feels better to code by myself, and it makes me feel better when I study it. Here I will talk about a problem I encountered - that is, an error will be reported when importing pyqt5. In fact, there is no error and it can run normally
. Later, I found a solution in [Muzi Huaner]'s article (https ://blog.csdn.net/muzihuaner/article/details/106205930)
Create a new .pylintrc file and enter the following code, the problem will be solved perfectly - extension-pkg-whitelist=PyQt5
vscode tutorial! !
The above is the detailed content of A brief discussion on how to build and configure the PyQt5 environment in VSCode. For more information, please follow other related articles on the PHP Chinese website!
Is Visual Studio Still Free? Understanding the AvailabilityApr 18, 2025 am 12:05 AMYes, some versions of VisualStudio are free. Specifically, VisualStudioCommunityEdition is free for individual developers, open source projects, academic research, and small organizations. However, there are also paid versions such as VisualStudioProfessional and Enterprise, suitable for large teams and enterprises, providing additional features.
Using Visual Studio: Developing Software Across PlatformsApr 17, 2025 am 12:13 AMCross-platform development with VisualStudio is feasible, and by supporting frameworks like .NETCore and Xamarin, developers can write code at once and run on multiple operating systems. 1) Create .NETCore projects and use their cross-platform capabilities, 2) Use Xamarin for mobile application development, 3) Use asynchronous programming and code reuse to optimize performance to ensure efficient operation and maintainability of applications.
How to format json with vscodeApr 16, 2025 am 07:54 AMThe ways to format JSON in VS Code are: 1. Use shortcut keys (Windows/Linux: Ctrl Shift I; macOS: Cmd Shift I); 2. Go through the menu ("Edit" > "Format Document"); 3. Install JSON formatter extensions (such as Prettier); 4. Format manually (use shortcut keys to indent/extract blocks or add braces and semicolons); 5. Use external tools (such as JSONLint and JSON Formatter).
How to compile vscodeApr 16, 2025 am 07:51 AMCompiling code in VSCode is divided into 5 steps: Install the C extension; create the "main.cpp" file in the project folder; configure the compiler (such as MinGW); compile the code with the shortcut key ("Ctrl Shift B") or the "Build" button; run the compiled program with the shortcut key ("F5") or the "Run" button.
How to install vscodeApr 16, 2025 am 07:48 AMTo install Visual Studio Code, please follow the following steps: Visit the official website https://code.visualstudio.com/; download the installer according to the operating system; run the installer; accept the license agreement and select the installation path; VSCode will start automatically after the installation is completed.
How to enlarge fonts with vscodeApr 16, 2025 am 07:45 AMThe methods to enlarge fonts in Visual Studio Code are: open the settings panel (Ctrl, or Cmd,). Search and adjust "Font Size". Choose "Font Family" with the right size. Install or select a theme that provides the right size. Use keyboard shortcuts (Ctrl or Cmd) to enlarge the font.
How to connect to a remote server with vscodeApr 16, 2025 am 07:42 AMHow to connect to a remote server through VSCode? Install Remote - SSH Extended Configuration SSH Create a Connection in VSCode Enter connection information: Host, Username, Port, SSH Key Double-click the saved connection in Remote Explorer
How to run vue with vscodeApr 16, 2025 am 07:39 AMRunning a Vue project in VSCode requires the following steps: 1. Install the Vue CLI; 2. Create a Vue project; 3. Switch to the project directory; 4. Install project dependencies; 5. Run the development server; 6. Open the browser to visit http://localhost:8080.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 English version
Recommended: Win version, supports code prompts!

Atom editor mac version download
The most popular open source editor

Dreamweaver Mac version
Visual web development tools





Create a new .pylintrc file and enter the following code, the problem will be solved perfectly

