本页内容

添加 Qt 版本

您可以使用多个 Qt 版本并行开发,如 Qt 5.15.11 和 Qt 6.8.0。你必须添加至少一个为 MSVC 构建的 Qt 版本,才能创建 Qt 项目。

Qt 版本

检测已安装的 Qt 版本

Qt VS Tools 可以自动检测你用Qt Online Installer 安装的 Qt 版本。要自动检测已安装的 Qt 版本,请选择Autodetect 。

要从文件夹检测已安装的 Qt 版本,请选择Import 并定位 Qt 安装文件夹。

删除 Qt 版本

要删除已卸载 Qt 版本的条目,请选择Cleanup 。

要删除特定 Qt 版本,请在列表中选择该版本,然后选择Remove 。

只有在将其他版本设为默认版本或该版本是列表中唯一的 Qt 版本时,才能删除默认 Qt 版本。

设置默认 Qt 版本

要设置创建新项目或从.pro 文件导入项目时默认使用的 Qt 版本,请在列表中选择该版本,然后选择Default 。

关闭有关新 Qt 版本的通知

要关闭有关新 Qt 版本可用的通知,请执行以下操作

  1. 转到Extensions >Qt VS Tools >Options >Qt >General >Notifications 。

    Qt 常规选项中的通知

  2. 在Update Qt installation 中,选择Disable 。

添加其他 Qt 版本

要添加您从Qt Online Installer 以外的其他来源安装或自己构建的 Qt 版本:

  1. 转到Extensions >Qt VS Tools >Qt Versions 。
  2. 选择Add 。
  3. 在Name 中,输入 Qt 版本的名称。如果您先添加了 Qt Location,则该字段将自动填写。
  4. 在Location 中,输入 Qt 版本的 qmake.exe 的路径。例如:C:\Qt\6.8.0\msvc2022_64\bin\qmake.exe 。
  5. 在Host 中,选择Windows ,除非您想为嵌入式 Linux 设备交叉编译应用程序。Compiler 显示编译器类型。
  6. 选择OK 。

另请参阅 为项目选择 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.