获取和安装 Qt

您可以通过不同方式在计算机上安装 Qt。下表概述了每种方法及其最有用的时间。

方法说明何时使用
Qt Online Installer (图形用户界面)图形化安装程序可让您交互式地选择 Qt 版本、模块和工具。在大多数情况下,这是安装 Qt 的最佳方法。
  • 您是 Qt 新手。
  • 您喜欢可视化界面。
  • 在台式电脑上安装 Qt。
Qt Online Installer (命令行)允许使用脚本或自动化工具进行无人值守的安装。
  • 您需要在多台机器上安装 Qt。
  • 您正在设置 CI/CD 管道。
  • 您希望自动安装,而无需用户交互。
从源代码编译从源代码下载并手动编译 Qt。
  • 您需要自定义构建(例如,带有补丁或调试选项)。
  • 您的平台不支持预编译软件包。
  • 您正在为 Qt 做出贡献或调试其内部结构。
软件包管理器: 无需 Qt 账户,即可安装最新版本的 Qt。
  • 轻量级,适合自动化。
  • 你需要安装 Qt 作为应用程序的依赖项,但不打算自己使用 Qt 进行开发工作。
  • 您不需要特殊模块或商业模块。

安装 Qt 后,您可以使用Qt Maintenance Tool (包含在每个 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.