構建 Qt 源

You can install Qt by building Qt sources. This is useful if, for example:

  • You need a custom build (for example, with patches or debug options).
  • Your platform isn't supported by pre-built packages.
  • You're contributing to Qt or debugging its internals.

注意: In most use cases, other than those listed above, the best way to install Qt is with Qt Online Installer. See 采用 Qt 在綫安裝程序獲取和安裝 Qt .

The installation procedure is different on each Qt platform. This page provides relevant information for the supported platforms and links to module-specific system requirements.

一般安裝信息

When you build Qt sources, you use the configure tool to configure Qt for a particular platform with a particular set of Qt features or modules. For more information, see Qt 配置選項 .

The Build and Installation Process

A brief overview of the build and installation process:

  1. Download the Qt source code and set up the initial environment.
  2. Configure the build according to the use case, such as development on the host system or cross-compilation for a target platform.
  3. Build (compile) in a separate directory.
  4. Optional. Install the built artifacts.

Platform-Specific Installation Information

Windows

macOS

Linux/X11

嵌入式 Linux

Android

iOS

Module-specific System Requirements

附加信息

頂級 Qt5 Git 存儲庫包含一組構建指令,采用形式 供應腳本 , used by Qt's continuous integration (CI) system to build and test the 支持平颱 。這些腳本對於從源代碼構建 Qt 的任何人是有用的,因為它們為每種配置提供所需的工具和組件的相關信息。