安装
安装 VS Code 的 Qt 扩展,以便使用 VS Code 开发 Qt 和Qt Quick 应用程序。请根据您要开发的应用程序类型选择相应的 Qt 扩展包:
- Qt C++:用于开发 Qt C++ 和Qt Quick 应用程序
- Qt for Python:用于开发基于Qt for Python
- Qt WebAssembly,用于开发WebAssembly应用程序
您也可以选择是否通过扩展包安装单个扩展。Qt 扩展包包含所有 Qt 扩展。当您在项目中需要这些扩展时,它们会自动激活。
安装扩展包
要安装 Qt 扩展包:
- 在Activity Bar 中选择Extensions 图标,或按Ctrl+Shift+X。
- 在Extensions 中搜索Qt扩展包。

- 选择“Install ”。
“CMake For VisualStudio Code”和“CMake Tools”扩展将自动安装。
查看扩展状态
您可以为“Qt Extension for VS Code”开启自动更新,并在最新正式版与预发布版之间切换。不过,您应保持各版本的同步。具体来说,您必须使用相同版本的 Qt C++ 和Qt Core 扩展。
要查看每个已安装扩展的版本和激活状态,请在“Welcome ”中选择版本列表。

选择“Refresh ”以更新扩展状态信息。
另请参阅 “注册 Qt 安装”和“设置 Python 开发环境”。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.