本页内容

获取并安装 Qt

您可以通过多种方式在计算机上安装 Qt。下表概述了每种方法及其最适用的场景。

方法说明适用场景
Qt Online Installer (GUI)一种图形化安装程序,允许您以交互方式选择 Qt 版本、模块和工具。在大多数情况下,这是安装 Qt 的最佳方式。
  • 您是 Qt 新手。
  • 您更喜欢使用可视化界面。
  • 您正在桌面计算机上安装 Qt。
Qt Online Installer (命令行)支持通过脚本或自动化工具进行无人值守安装。
  • 您需要在多台机器上安装 Qt。
  • 您正在设置 CI/CD 管道。
  • 您希望在无需用户干预的情况下自动完成安装。
从源代码构建手动从源代码下载并编译 Qt。
  • 您需要自定义构建(例如,包含补丁或调试选项)。
  • 您的平台不被预编译包所支持。
  • 您正在为 Qt 做出贡献或调试其内部机制。
包管理器: 允许您安装最新版本的 Qt,而无需 Qt 账户。
  • 轻量级,适合自动化操作。
  • 您需要将 Qt 作为应用程序的依赖项进行安装,但并不打算亲自使用 Qt 进行开发工作。
  • 您不需要特殊或仅限商业使用的模块。

安装 Qt 后,您可以使用Qt Maintenance Tool (包含在每个 Qt 安装中)来添加、更新和删除组件。有关更多信息,请参阅“添加、更新和删除组件”。

支持的开发环境

Qt 支持以下开发主机:

平台支持的架构备注
Windowsx86_64、ARM64支持的配置
macOSx86_64、ARM64支持的配置
Linuxx86_64、ARM64支持的配置

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