项目

Qt VS Tools 提供向导,用于创建多种类型的 Qt 和Qt Quick 项目以及您添加到项目中的文件,如类、窗体文件或自定义 QML 类型。

您还可以将现有的 Qt 项目加载到 Visual Studio 中,以便进一步开发。

使用集成的 Qt 资源编辑器管理 Qt 项目中的资源。

创建 Qt 翻译源 (TS) 文件并从 Visual Studio 启动Qt Linguist ,以翻译应用程序中的字符串。

要创建 Qt 项目,请访问File >New >Project ,然后搜索 Qt。

Qt 项目向导模板

您可以创建以下类型的项目。

模板创建
Qt ActiveQt Server一个简单的 ActiveX 服务器。
Qt Class Library一个基本的基于 Qt 的动态库。
Qt Console Application一个基本的 Qt 控制台应用程序。
Qt Widgets Designer Custom Widget一个Qt Widgets Designer 自定义 widget 插件。
Qt Empty Application一个空的 Qt 应用程序项目。
Qt Quick Application一个Qt Quick 应用程序项目。
Qt Test Application一个简单的 Qt Test 应用程序。
Qt Widgets Application只有一个表单的简单 Qt Widgets 应用程序。

每个 Qt 项目都提供一个向导,允许你指定项目所需的 Qt 模块。对于某些项目,向导还会生成一个骨架类或 QML 类型实例,供你开始使用。

要开始编写 Qt 代码和构建项目,必须告诉 Visual Studio 在哪里可以找到要使用的Qt 版本。

应用程序教程包含使用项目模板的示例:

另请参阅 添加 Qt 版本和文件。

© 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.