Qt for macOS - 安装 Qt 的其他方法
概述
您可以从以下来源在 macOS 上安装 Qt Framework、Qt Designer 和开发工具:
- 使用 Qt Online Installer(推荐)。
- 在 Qt 发布当天即可访问其最新版本。
- 允许你同时安装旧版本和新版本的 Qt。
- 提供所有 Qt 模块,包括仅用于商业用途的模块。
- 在Qt Creator 和Qt Design Studio 中预先配置 Qt 版本。
- 允许你在本地浏览 Qt 文档和示例。
Qt Online Installer 它功能齐全、灵活,完全支持商业用例。它也是 Qt 公司和 Qt 项目支持最好的版本。如果您计划使用 Qt 进行开发,或将 Qt 作为应用程序的一部分进行捆绑,我们推荐您使用它。
- 使用 Homebrew 软件包管理器。
- 不需要 Qt 账户。
- 安装最新版本的 Qt 6(但不一定是最新版本)。
- 允许你安装大多数(但不是全部)Qt 模块。
- 不提供本地版本的 Qt 文档或示例。
- 允许你与其他库和应用程序共享第三方模块。
Homebrew 重量轻,适合自动化。如果你需要将 Qt 作为 macOS 应用程序的一个依赖项来安装,但又不打算自己使用 Qt 进行开发工作,也不需要特殊的或仅用于商业用途的 Qt 模块,那么 Homebrew 就非常适合你。
使用Qt Online Installer
有关如何使用Qt Online Installer 的信息,请参见使用 Qt Online Installer 获取并安装 Qt。
使用 Homebrew 安装 Qt
要使用 Homebrew 安装 Qt、Qt Creator 和Qt Design Studio ,请先使用安装命令安装 Homebrew。然后在终端中运行以下命令:
brew install qt brew install --cask qt-creator brew install --cask qt-design-studio
启动Qt Creator 或Qt Design Studio 时,需要设置 Homebrew 安装的 Qt 版本的路径。默认情况下,Homebrew 将 Qt 安装在/opt/homebrew/Cellar/qt/<version>/ 中。
有关在Qt Creator 中设置 Qt 工具包的更多信息,请参阅Qt Creator: 添加 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.