构建 Qt 源代码

安装 Qt 有两种方法:

  1. 通过Qt 安装程序- 下载并安装 Qt
  2. 通过Qt 源代码

注意: 将 Qt 构建目录添加到系统上运行的任何防病毒程序的排除目录列表中。

您可以从下载页面下载 Qt 安装程序和源代码。更多信息,请访问Qt 入门页面。

本页列出了通过构建 Qt 源码安装 Qt 的相关信息。每个 Qt 平台的安装程序都不同。本页收集了所支持平台的相关信息。此外,本页还提供了模块特定系统要求的链接。

一般安装信息

要从源代码构建 Qt,请使用configure 为特定平台配置具有特定 Qt 功能或模块集的 Qt。有关详细信息,请访问以下页面:

您也可以根据自己的特定需求构建优化版本的 Qt。更多信息,请访问以下页面:

Windows

macOS

Linux/X11

嵌入式 Linux

安卓

iOS

特定模块的系统要求

附加信息

顶级 qt5 Git 代码库包含一组以配置脚本provisioning scripts)为形式的构建说明,Qt 的持续集成(CI)系统使用这些说明来构建和测试支持的平台。这些脚本对任何从源代码构建 Qt 的人都很有用,因为它们提供了每种配置所需的工具和组件信息。

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