Genyleap/Docs
Guide de la pile de développement · Qt

Développement Qt.

Compilez la version stable actuelle de Qt depuis les sources avec des SDK host et target séparés. Les commandes dépendantes de version sont générées depuis un manifeste actualisé à partir des index officiels Qt et de la documentation plateforme.

Qt actuel 6.12.0 Qt Creator 20.0.2 CMake minimum 3.25 Actualisé Oct 11, 2026 10:54 UTC

Suivez la version stable actuelle, pas une version de guide figée.

Le numéro de release, l’archive source, la série de documentation, la version Qt Creator, les valeurs de compatibilité Android et la cible Emscripten sont résolus centralement. Quand Qt publie une nouvelle stable, le guide met à jour ses chemins et son snapshot de compatibilité sans édition manuelle de chaque page.

Utilisez une source de vérité unique.

Si une exigence upstream change, mettez à jour le resolver plutôt que de copier un numéro de version dans le texte. Les notes plateforme qui ne peuvent pas être déduites sûrement restent liées à la matrice officielle Qt actuelle.

Séparez les arbres source, build et installation.

Do not build inside the source tree and do not mix host and target installations. A neutral host prefix works on macOS, Linux or Windows; cross-compiled targets live beside it.

LayoutCurrent release
~/Qt/
├── Src/
│   └── qt-everywhere-src-6.12.0/
├── Build/
│   └── 6.12.0/
│       ├── host/
│       ├── linux-x86_64/
│       ├── linux-arm64/
│       ├── linux-armv7/
│       ├── rpi-aarch64/
│       ├── android-arm64-v8a/
│       ├── android-armeabi-v7a/
│       ├── android-x86_64/
│       ├── android-x86/
│       ├── ios/
│       ├── ios-device/
│       ├── ios-simulator/
│       ├── wasm/
│       └── wasm-threads-simd/
├── 6.12.0/
│   ├── host/
│   ├── linux-x86_64/
│   ├── linux-arm64/
│   ├── linux-armv7/
│   ├── rpi-aarch64/
│   ├── android-arm64-v8a/
│   ├── android-armeabi-v7a/
│   ├── android-x86_64/
│   ├── android-x86/
│   ├── ios/
│   ├── ios-device/
│   ├── ios-simulator/
│   ├── wasm/
│   └── wasm-threads-simd/
└── Toolchains/
    └── emsdk/

Récupérez l’archive source stable actuelle.

L’URL de l’archive ci-dessous est générée depuis l’index stable actuel de Qt.

ShellDownload and extract
mkdir -p "$HOME/Qt/Src"
cd "$HOME/Qt/Src"

curl -fLO "https://download.qt.io/official_releases/qt/6.12/6.12.0/single/qt-everywhere-src-6.12.0.tar.xz"
tar -xf "qt-everywhere-src-6.12.0.tar.xz"

Matrice de targets actuelle.

TargetCurrent compatibility snapshotBuild rule
macOSXcode 16+Native Apple toolchain; universal builds are optional.
LinuxUbuntu 24.04 / Debian 11.6–12 · x86_64, arm64Native x86_64 and arm64 are in the current supported desktop matrix; additional embedded Linux architectures require a matching toolchain and sysroot.
Embedded LinuxRaspberry Pi, Jetson, Orange Pi, BeagleBone, RISC-V boardsUse a host Qt, board-matching cross compiler, sysroot and CMake toolchain file.
WindowsMSVC 2022 · Mingw-w64 15.1Gardez les préfixes et arbres de build MSVC et MinGW séparés.
AndroidAndroid 9–16 · API 28–36 · arm64-v8a, armeabi-v7a, x86_64, x86Build a host Qt first, then keep each Android ABI in its own build and install tree.
iOSXcode 16+ · iOS 18+Compilez sur macOS ; gardez le support device et simulateur dans le SDK cible iOS.
WebAssemblyEmscripten 5.0.5Compilez d’abord un Qt host correspondant ; gardez les variantes single-thread et threaded séparées.

For exact architecture and distribution rows, use the current Qt supported-platforms matrix ↗. This guide intentionally avoids duplicating long-lived platform tables that upstream owns.

Compilez d’abord le Qt host.

Les builds source Android, iOS et WebAssembly nécessitent les outils Qt host de la même release. Compilez et vérifiez le SDK host avant toute cross-compilation.

macOS host

ShellPrepare
sudo xcode-select --switch /Applications/Xcode.app
sudo xcodebuild -license accept

brew install cmake ninja python bison flex gperf node pkg-config

cmake --version
ninja --version
xcrun clang++ --version
ShellConfigure and build host Qt
mkdir -p "$HOME/Qt/Build/6.12.0/host"
cd "$HOME/Qt/Build/6.12.0/host"

"$HOME/Qt/Src/qt-everywhere-src-6.12.0/configure" \
  -prefix "$HOME/Qt/6.12.0/host" \
  -release \
  -shared \
  -make examples

cmake --build . --parallel
cmake --install .

Linux host

ShellUbuntu / Debian baseline
sudo apt update
sudo apt install -y \
  build-essential \
  clang \
  cmake \
  ninja-build \
  pkg-config \
  python3 \
  bison \
  flex \
  gperf \
  nodejs

Add the X11/Wayland, OpenGL/Vulkan, multimedia, accessibility and other development packages required by the modules you intend to build. Qt's configure summary is authoritative: do not ignore a disabled feature you actually need.

Windows host

Use a Developer PowerShell for the current supported MSVC toolchain, with CMake and Ninja visible in the same environment.

PowerShellConfigure and build
mkdir C:\Qt\build\6.12.0\host
cd C:\Qt\build\6.12.0\host

C:\\Qt\\Src\\qt-everywhere-src-6.12.0\\configure.bat `
  -prefix C:\\Qt\\6.12.0\\host `
  -release `
  -shared `
  -make examples

cmake --build . --parallel
cmake --install .

SDK macOS universel optionnel.

Si une installation Qt doit contenir les slices Intel et Apple Silicon, créez un préfixe universel dédié plutôt que de modifier le build host natif.

Shellx86_64 + arm64
mkdir -p "$HOME/Qt/Build/6.12.0/macos-universal"
cd "$HOME/Qt/Build/6.12.0/macos-universal"

"$HOME/Qt/Src/qt-everywhere-src-6.12.0/configure" \
  -prefix "$HOME/Qt/6.12.0/macos-universal" \
  -release \
  -shared \
  -- \
  -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64"

cmake --build . --parallel
cmake --install .

Linux architectures.

Qt's current supported desktop matrix covers x86_64 and arm64 on current Ubuntu and Debian releases. Other Linux architectures can still be built from source when you provide a matching cross compiler and sysroot, but they are not equivalent to the officially supported desktop configurations.

ArchitectureBuild modeSupport level
x86_64Native desktopCurrent supported Linux desktop architecture
arm64 / aarch64Native desktop or cross-compiledCurrent supported Linux desktop architecture on listed Ubuntu/Debian releases
armv7 / armhfCross-compiled embedded LinuxRequires target-specific toolchain, sysroot and device validation
riscv64Cross-compiled embedded/custom LinuxPossible with a working toolchain/sysroot; not in the current mainstream desktop matrix

Native x86_64

Use this on a 64-bit Intel/AMD Linux host. Keep the install prefix architecture-specific so it never collides with ARM builds.

ShellLinux x86_64
mkdir -p "$HOME/Qt/Build/6.12.0/linux-x86_64"
cd "$HOME/Qt/Build/6.12.0/linux-x86_64"

"$HOME/Qt/Src/qt-everywhere-src-6.12.0/configure" \
  -prefix "$HOME/Qt/6.12.0/linux-x86_64" \
  -release \
  -shared \
  -make examples

cmake --build . --parallel
cmake --install .

Native arm64 / aarch64

On an ARM64 Linux machine, build natively exactly as you would on x86_64. Qt currently lists Ubuntu 24.04 and Debian 11.6/12 ARM64 in the supported Linux matrix.

ShellLinux arm64
mkdir -p "$HOME/Qt/Build/6.12.0/linux-arm64"
cd "$HOME/Qt/Build/6.12.0/linux-arm64"

"$HOME/Qt/Src/qt-everywhere-src-6.12.0/configure" \
  -prefix "$HOME/Qt/6.12.0/linux-arm64" \
  -release \
  -shared \
  -make examples

cmake --build . --parallel
cmake --install .

Cross-compile x86_64 host → arm64 target

Cross-compiling Qt for Linux requires a host Qt of the same release, a target sysroot and a CMake toolchain file. The example below uses the conventional aarch64-linux-gnu toolchain; replace the sysroot with the one that belongs to your actual target distribution or device.

On Ubuntu or Debian, install the matching cross compilers for the architectures you intend to build: gcc-aarch64-linux-gnu, g++-aarch64-linux-gnu, gcc-arm-linux-gnueabihf and g++-arm-linux-gnueabihf.

CMakelinux-aarch64-toolchain.cmake
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR aarch64)

set(CMAKE_SYSROOT "/opt/sysroots/aarch64-linux-gnu")
set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
ShellCross-build arm64
mkdir -p "$HOME/Qt/Build/6.12.0/linux-arm64"
cd "$HOME/Qt/Build/6.12.0/linux-arm64"

"$HOME/Qt/Src/qt-everywhere-src-6.12.0/configure" \
  -release \
  -qt-host-path "$HOME/Qt/6.12.0/host" \
  -extprefix "$HOME/Qt/6.12.0/linux-arm64" \
  -prefix "/usr/local/qt6" \
  -nomake tests \
  -- \
  -DCMAKE_TOOLCHAIN_FILE="$HOME/Qt/Toolchains/linux-aarch64-toolchain.cmake"

cmake --build . --parallel
cmake --install .

Cross-compile x86_64 host → ARMv7 hard-float

ARMv7 is useful for older embedded Linux devices and 32-bit ARM boards. It is a cross-compiled embedded target, not part of the current mainstream Linux desktop support matrix. Use the sysroot and compiler that match the device image exactly.

CMakelinux-armv7-toolchain.cmake
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)

set(CMAKE_SYSROOT "/opt/sysroots/arm-linux-gnueabihf")
set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
set(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++)

set(CMAKE_C_FLAGS_INIT "-march=armv7-a -mfpu=neon -mfloat-abi=hard")
set(CMAKE_CXX_FLAGS_INIT "-march=armv7-a -mfpu=neon -mfloat-abi=hard")

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
ShellCross-build ARMv7
mkdir -p "$HOME/Qt/Build/6.12.0/linux-armv7"
cd "$HOME/Qt/Build/6.12.0/linux-armv7"

"$HOME/Qt/Src/qt-everywhere-src-6.12.0/configure" \
  -release \
  -qt-host-path "$HOME/Qt/6.12.0/host" \
  -extprefix "$HOME/Qt/6.12.0/linux-armv7" \
  -prefix "/usr/local/qt6" \
  -nomake tests \
  -- \
  -DCMAKE_TOOLCHAIN_FILE="$HOME/Qt/Toolchains/linux-armv7-toolchain.cmake"

cmake --build . --parallel
cmake --install .
Other Linux architectures.

The same Qt 6 cross-compilation model also applies to architectures such as riscv64 when a working compiler, sysroot and graphics/input stack exist. Treat these as target-specific embedded builds unless the current Qt supported-platforms matrix explicitly lists them.

Raspberry Pi and other Linux boards.

Qt 6 uses the same cross-compilation model for Raspberry Pi and other Linux boards: a host Qt of the same release, a cross compiler, a sysroot that exactly matches the target image, and a CMake toolchain file. The old Qt 5 device-mkspec-only workflow is not sufficient for Qt 6.

Board familyTypical architectureNotes
Raspberry Pi 5 / Raspberry Pi 4 · 64-bit OSaarch64 / arm64Recommended path for current Raspberry Pi OS and modern embedded deployments.
Raspberry Pi 4 / older Pi · 32-bit OSarmv7 / armhfUse the ARMv7 hard-float toolchain and a matching 32-bit sysroot.
NVIDIA Jetson familyaarch64Use the JetPack/L4T-compatible sysroot so EGL, OpenGL ES and vendor libraries match the device.
Orange Pi / Rockchip boardsaarch64 or armv7Architecture depends on the SoC and installed Linux image.
BeagleBone Blackarmv7 / armhfUsually cross-compiled with arm-linux-gnueabihf.
RISC-V development boardsriscv64Requires a target-specific compiler, sysroot and graphics/input stack.

Raspberry Pi 4 / 5 · 64-bit example

Prefer an SDK or sysroot produced from the exact operating-system image running on the board. A sysroot copied from a different Raspberry Pi OS or distro revision can configure successfully and still fail later because EGL, Mesa, libc or other target libraries do not match.

ShellHost cross-compiler baseline
sudo apt update
sudo apt install -y \
  gcc-aarch64-linux-gnu \
  g++-aarch64-linux-gnu \
  cmake \
  ninja-build \
  pkg-config

export RPI_SYSROOT="$HOME/Qt/Sysroots/rpi-aarch64"
export QT_HOST="$HOME/Qt/6.12.0/host"
CMakerpi-aarch64-toolchain.cmake
set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR aarch64)

set(CMAKE_SYSROOT "$ENV{RPI_SYSROOT}")

set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)
set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)

set(CMAKE_FIND_ROOT_PATH "$ENV{RPI_SYSROOT}")
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
ShellBuild Qt Base for Raspberry Pi
export RPI_SYSROOT="$HOME/Qt/Sysroots/rpi-aarch64"
export QT_HOST="$HOME/Qt/6.12.0/host"

mkdir -p "$HOME/Qt/Build/6.12.0/rpi-aarch64"
cd "$HOME/Qt/Build/6.12.0/rpi-aarch64"

"$HOME/Qt/Src/qt-everywhere-src-6.12.0/qtbase/configure" \
  -release \
  -opengl es2 \
  -qt-host-path "$QT_HOST" \
  -extprefix "$HOME/Qt/6.12.0/rpi-aarch64" \
  -prefix "/usr/local/qt6" \
  -nomake examples \
  -nomake tests \
  -- \
  -DCMAKE_TOOLCHAIN_FILE="$HOME/Qt/Toolchains/rpi-aarch64-toolchain.cmake"

cmake --build . --parallel
cmake --install .
Graphics support comes from the target sysroot.

For Raspberry Pi, Jetson and similar boards, check the configure summary for the platform integration you actually need: EGLFS, Wayland, OpenGL ES or another QPA backend. A successful compiler test alone does not prove that the target graphics stack is usable.

Deploy and verify on the board

ShellExample deployment
rsync -a --delete \
  "$HOME/Qt/6.12.0/rpi-aarch64/" \
  user@raspberrypi:/usr/local/qt6/

ssh user@raspberrypi \
  '/usr/local/qt6/bin/qtpaths --qt-version'

For a 32-bit Raspberry Pi image or BeagleBone-class target, use the ARMv7 toolchain shown in the Linux architecture section and keep a separate rpi-armv7 or device-specific installation prefix.

Android.

The current manifest resolves Android 9–16, API 28–36, Build Tools 36.0.0, NDK r27c (27.2.12479018), JDK 21, Gradle 9.5.1 and AGP 9.2.1 from Qt's current documentation.

ShellInstall current Qt-compatible Android components
sdkmanager \
  "platform-tools" \
  "platforms;android-36" \
  "build-tools;36.0.0" \
  "ndk;27.2.12479018"

macOS · arm64-v8a

This is the verified source-build path on macOS when Android Studio or the Android command-line tools installed the SDK in its standard location.

ShellConfigure Qt for Android
mkdir -p "$HOME/Qt/Build/6.12.0/android-arm64-v8a"
cd "$HOME/Qt/Build/6.12.0/android-arm64-v8a"

"$HOME/Qt/Src/qt-everywhere-src-6.12.0/configure" \
  -prefix "$HOME/Qt/6.12.0/android-arm64-v8a" \
  -qt-host-path "$HOME/Qt/6.12.0/host" \
  -android-abis arm64-v8a \
  -android-sdk "$HOME/Library/Android/sdk" \
  -android-ndk "$HOME/Library/Android/sdk/ndk/27.2.12479018" \
  -release
ShellBuild and install
cmake --build . --parallel
cmake --install .

Supported Android ABIs

ABITypical useSuggested Qt prefix
arm64-v8aPrimary 64-bit ARM phones and tabletsandroid-arm64-v8a
armeabi-v7aOlder 32-bit ARM devicesandroid-armeabi-v7a
x86_6464-bit x86 Android emulators and compatible devicesandroid-x86_64
x86Legacy 32-bit x86 emulator/device coverageandroid-x86

macOS · armeabi-v7a

Shell32-bit ARM Android
mkdir -p "$HOME/Qt/Build/6.12.0/android-armeabi-v7a"
cd "$HOME/Qt/Build/6.12.0/android-armeabi-v7a"

"$HOME/Qt/Src/qt-everywhere-src-6.12.0/configure" \
  -prefix "$HOME/Qt/6.12.0/android-armeabi-v7a" \
  -qt-host-path "$HOME/Qt/6.12.0/host" \
  -android-abis armeabi-v7a \
  -android-sdk "$HOME/Library/Android/sdk" \
  -android-ndk "$HOME/Library/Android/sdk/ndk/27.2.12479018" \
  -release

cmake --build . --parallel
cmake --install .

macOS · x86_64

Shell64-bit x86 Android
mkdir -p "$HOME/Qt/Build/6.12.0/android-x86_64"
cd "$HOME/Qt/Build/6.12.0/android-x86_64"

"$HOME/Qt/Src/qt-everywhere-src-6.12.0/configure" \
  -prefix "$HOME/Qt/6.12.0/android-x86_64" \
  -qt-host-path "$HOME/Qt/6.12.0/host" \
  -android-abis x86_64 \
  -android-sdk "$HOME/Library/Android/sdk" \
  -android-ndk "$HOME/Library/Android/sdk/ndk/27.2.12479018" \
  -release

cmake --build . --parallel
cmake --install .
Optional legacy x86 build
Shell32-bit x86 Android
mkdir -p "$HOME/Qt/Build/6.12.0/android-x86"
cd "$HOME/Qt/Build/6.12.0/android-x86"

"$HOME/Qt/Src/qt-everywhere-src-6.12.0/configure" \
  -prefix "$HOME/Qt/6.12.0/android-x86" \
  -qt-host-path "$HOME/Qt/6.12.0/host" \
  -android-abis x86 \
  -android-sdk "$HOME/Library/Android/sdk" \
  -android-ndk "$HOME/Library/Android/sdk/ndk/27.2.12479018" \
  -release

cmake --build . --parallel
cmake --install .
First configure may spend time resolving Gradle dependencies.

Qt may download Gradle 9.5.1 and the Android Gradle Plugin 9.2.1 during dependency resolution. A Gradle BUILD SUCCESSFUL message means that dependency-resolution stage completed successfully; Qt's top-level configure must still finish without a later CMake error before the build tree is considered ready.

If Gradle times out

Populate Qt's Gradle cache explicitly, then rerun the configure command above. This keeps the actual Qt build offline with respect to Gradle dependencies.

ShellResolve Gradle dependencies once
QT_SRC="$HOME/Qt/Src/qt-everywhere-src-6.12.0"

cmake -E env \
  ANDROID_SDK_ROOT="$HOME/Library/Android/sdk" \
  cmake \
  -DACTION_RESOLVE_GRADLE=ON \
  -DQT_ROOT_DIR="$QT_SRC/qtbase" \
  -DGRADLE_PROJECT_DIR="$QT_SRC/qtbase/src/android/jar" \
  -DGRADLE_BUILD_VARIANT=Release \
  -DQT_ANDROID_SDK_BUILD_TOOLS_REVISION=36.0.0 \
  -P "$QT_SRC/qtbase/cmake/QtSetupAndroid.cmake"

Other host platforms

The configure arguments are the same; only the Android SDK path changes. Common SDK locations are ~/Android/Sdk on Linux, ~/Library/Android/sdk on macOS and C:\Users\<USER>\AppData\Local\Android\Sdk on Windows. Keep the host Qt path and Android target installation separate.

POSIX shellPortable SDK variables
export ANDROID_SDK_ROOT="/path/to/Android/Sdk"
export ANDROID_NDK_ROOT="$ANDROID_SDK_ROOT/ndk/27.2.12479018"

"$HOME/Qt/Src/qt-everywhere-src-6.12.0/configure" \
  -prefix "$HOME/Qt/6.12.0/android-arm64-v8a" \
  -qt-host-path "$HOME/Qt/6.12.0/host" \
  -android-abis arm64-v8a \
  -android-sdk "$ANDROID_SDK_ROOT" \
  -android-ndk "$ANDROID_NDK_ROOT" \
  -release

Multi-ABI application packages

Build Qt once per ABI, then let the application build combine the installed Qt SDKs into a multi-ABI APK, AAB or AAR. Because these source-built prefixes use explicit names, pass their paths to CMake instead of relying on installer-directory autodetection.

Shellarm64-v8a + armeabi-v7a + x86_64
"$HOME/Qt/6.12.0/android-arm64-v8a/bin/qt-cmake" \
  -S /path/to/app \
  -B /path/to/app-build \
  -GNinja \
  -DANDROID_SDK_ROOT="$HOME/Library/Android/sdk" \
  -DANDROID_NDK_ROOT="$HOME/Library/Android/sdk/ndk/27.2.12479018" \
  -DQT_ANDROID_ABIS="arm64-v8a;armeabi-v7a;x86_64" \
  -DQT_PATH_ANDROID_ABI_arm64-v8a="$HOME/Qt/6.12.0/android-arm64-v8a" \
  -DQT_PATH_ANDROID_ABI_armeabi-v7a="$HOME/Qt/6.12.0/android-armeabi-v7a" \
  -DQT_PATH_ANDROID_ABI_x86_64="$HOME/Qt/6.12.0/android-x86_64"

cmake --build /path/to/app-build --target apk
# or:
cmake --build /path/to/app-build --target aab

Use only the ABIs your product needs. Keeping each Qt ABI in its own prefix makes upgrades, verification and multi-ABI packaging deterministic.

iOS device and Simulator.

iOS builds run on macOS and use the Apple SDK supplied by the current Xcode toolchain. The current compatibility snapshot requires Xcode 16+ and iOS 18+. The device architecture is arm64; the simulator architecture resolved from the current Qt documentation is x86_64.

TargetSDKArchitectureInstall prefix
Deviceiphoneosarm64ios-device
Simulatoriphonesimulatorx86_64ios-simulator
Combined Qt SDKDevice + SimulatorQt-managedios

Default: build one Qt for iOS SDK containing device and Simulator libraries

Qt's default iOS source build includes both device and Simulator libraries. Use this when a single Qt installation should drive both Xcode run destinations.

ShellCombined iOS SDK
mkdir -p "$HOME/Qt/Build/6.12.0/ios"
cd "$HOME/Qt/Build/6.12.0/ios"

"$HOME/Qt/Src/qt-everywhere-src-6.12.0/configure" \
  -platform macx-ios-clang \
  -qt-host-path "$HOME/Qt/6.12.0/host" \
  -prefix "$HOME/Qt/6.12.0/ios" \
  -release

cmake --build . --parallel
cmake --install .

Device-only SDK

Utilisation -sdk iphoneos when you want a dedicated physical-device Qt installation.

Shelliphoneos · arm64
mkdir -p "$HOME/Qt/Build/6.12.0/ios-device"
cd "$HOME/Qt/Build/6.12.0/ios-device"

"$HOME/Qt/Src/qt-everywhere-src-6.12.0/configure" \
  -platform macx-ios-clang \
  -sdk iphoneos \
  -qt-host-path "$HOME/Qt/6.12.0/host" \
  -prefix "$HOME/Qt/6.12.0/ios-device" \
  -release

cmake --build . --parallel
cmake --install .

Simulator-only SDK

Utilisation -sdk iphonesimulator for a dedicated Simulator Qt installation.

Shelliphonesimulator · x86_64
mkdir -p "$HOME/Qt/Build/6.12.0/ios-simulator"
cd "$HOME/Qt/Build/6.12.0/ios-simulator"

"$HOME/Qt/Src/qt-everywhere-src-6.12.0/configure" \
  -platform macx-ios-clang \
  -sdk iphonesimulator \
  -qt-host-path "$HOME/Qt/6.12.0/host" \
  -prefix "$HOME/Qt/6.12.0/ios-simulator" \
  -release

cmake --build . --parallel
cmake --install .
Apple Silicon: the current Qt iOS Simulator libraries are x86_64.

The Simulator run destination therefore uses Rosetta on Apple Silicon Macs. With Xcode 26 or newer, install the universal iOS platform component if the Rosetta-based Simulator destination is missing:

ShellXcode 26+
xcodebuild -downloadPlatform iOS -architectureVariant universal

Build an application

Use the qt-cmake from the selected iOS Qt prefix. The generated Xcode project can then run on the physical device or Simulator destination represented by that SDK.

ShellSimulator application
"$HOME/Qt/6.12.0/ios-simulator/bin/qt-cmake" \
  -S /path/to/app \
  -B /path/to/app-build-ios-simulator \
  -G Xcode

cmake --build /path/to/app-build-ios-simulator \
  --config Release

Do not manually force a different Simulator architecture unless the current Qt iOS documentation explicitly supports it. The release manifest tracks the Simulator architecture from Qt's current upstream documentation.

WebAssembly.

Each Qt minor release targets a specific Emscripten version. The current resolver pins 5.0.5. Use that exact version for the baseline build and keep the emsdk installation isolated from unrelated Emscripten projects.

macOS / Linux: install and activate the matching Emscripten SDK

POSIX shellInstall · activate · verify
export EMSCRIPTEN_VERSION="5.0.5"
export EMSDK_ROOT="$HOME/Qt/Toolchains/emsdk"

mkdir -p "$HOME/Qt/Toolchains"

if [ ! -d "$EMSDK_ROOT/.git" ]; then
  git clone https://github.com/emscripten-core/emsdk.git "$EMSDK_ROOT"
fi

cd "$EMSDK_ROOT"

./emsdk install "$EMSCRIPTEN_VERSION"
./emsdk activate "$EMSCRIPTEN_VERSION"

test -f "$EMSDK_ROOT/.emscripten" || {
  echo "Emscripten activation failed: $EMSDK_ROOT/.emscripten is missing" >&2
  exit 1
}

source "$EMSDK_ROOT/emsdk_env.sh"

command -v em++
em++ --version
em++ --version | grep -F "$EMSCRIPTEN_VERSION"
install and activate are two separate commands.

If they are accidentally pasted together, the SDK is not activated and .emscripten is not created. Sourcing emsdk_env.sh alone is not enough. Qt reads $EMSDK/.emscripten during WebAssembly auto-detection.

Repair an emsdk checkout that shows .emscripten: No such file or directory

POSIX shellRepair the active SDK
export EMSCRIPTEN_VERSION="5.0.5"
cd "$HOME/Qt/Toolchains/emsdk"

./emsdk install "$EMSCRIPTEN_VERSION"
./emsdk activate "$EMSCRIPTEN_VERSION"
source ./emsdk_env.sh

test -f "$EMSDK/.emscripten"
em++ --version
em++ --version | grep -F "$EMSCRIPTEN_VERSION"

If em++ --version still reports a different development version such as *-git, do not continue with the baseline Qt build. Re-run activate, source the environment again, and verify the version before configuring Qt.

Windows PowerShell installation

Run this block only in PowerShell on Windows. Do not paste Set-Location, .bat or .ps1 commands into zsh/bash on macOS or Linux.

PowerShellWindows · install · activate · verify
$env:EMSCRIPTEN_VERSION = "5.0.5"
$emsdkRoot = "$HOME\Qt\Toolchains\emsdk"

if (-not (Test-Path "$emsdkRoot\.git")) {
    git clone https://github.com/emscripten-core/emsdk.git $emsdkRoot
}

Set-Location $emsdkRoot

.\emsdk.bat install $env:EMSCRIPTEN_VERSION
.\emsdk.bat activate $env:EMSCRIPTEN_VERSION
.\emsdk_env.ps1

em++ --version

Baseline single-threaded SDK

After a failed configure, remove the incomplete build tree before trying again. A failed configure does not create a usable build.ninja or cmake_install.cmake.

ShellConfigure and build
export EMSCRIPTEN_VERSION="5.0.5"
export EMSDK_ROOT="$HOME/Qt/Toolchains/emsdk"

cd "$EMSDK_ROOT"
./emsdk activate "$EMSCRIPTEN_VERSION"
source "$EMSDK_ROOT/emsdk_env.sh"

test -f "$EMSDK_ROOT/.emscripten"
em++ --version | grep -F "$EMSCRIPTEN_VERSION"

rm -rf "$HOME/Qt/Build/6.12.0/wasm"
mkdir -p "$HOME/Qt/Build/6.12.0/wasm"
cd "$HOME/Qt/Build/6.12.0/wasm"

"$HOME/Qt/Src/qt-everywhere-src-6.12.0/configure" \
  -qt-host-path "$HOME/Qt/6.12.0/host" \
  -platform wasm-emscripten \
  -prefix "$HOME/Qt/6.12.0/wasm" \
  -release

cmake --build . --parallel
cmake --install .

Threads + SIMD build

ShellPerformance-oriented variant
export EMSCRIPTEN_VERSION="5.0.5"
export EMSDK_ROOT="$HOME/Qt/Toolchains/emsdk"

cd "$EMSDK_ROOT"
./emsdk activate "$EMSCRIPTEN_VERSION"
source "$EMSDK_ROOT/emsdk_env.sh"

test -f "$EMSDK_ROOT/.emscripten"
em++ --version | grep -F "$EMSCRIPTEN_VERSION"

rm -rf "$HOME/Qt/Build/6.12.0/wasm-threads-simd"
mkdir -p "$HOME/Qt/Build/6.12.0/wasm-threads-simd"
cd "$HOME/Qt/Build/6.12.0/wasm-threads-simd"

"$HOME/Qt/Src/qt-everywhere-src-6.12.0/configure" \
  -qt-host-path "$HOME/Qt/6.12.0/host" \
  -platform wasm-emscripten \
  -prefix "$HOME/Qt/6.12.0/wasm-threads-simd" \
  -release \
  -feature-thread \
  -feature-wasm-simd128

cmake --build . --parallel
cmake --install .
Les capacités du navigateur font partie de la toolchain.

WebAssembly avec threads exige une isolation cross-origin et un contexte sécurisé. SIMD, exceptions, dynamic linking et Asyncify doivent être vérifiés contre la documentation Qt WebAssembly actuelle et les navigateurs réellement ciblés.

Ce que signifie « Qt complet ».

Use the complete Qt source package and avoid -skip unless a module is intentionally excluded. Qt still builds only modules supported by the current target and whose external dependencies are satisfied. A desktop host, Android, iOS and WebAssembly are separate SDKs and do not expose identical module sets.

Read the configure summary.

Une commande réussie ne suffit pas si une fonctionnalité requise a été désactivée silencieusement faute de dépendance système. Toute fonctionnalité désactivée de façon inattendue est une erreur de configuration.

Les projets Qt modernes restent des projets C++ modernes.

Qt ne justifie pas un retour à l’architecture header-first ni aux anciens idiomes console. Gardez le code domain/application dans des modules projet, utilisez Qt Quick/QML comme adaptateur de présentation et maintenez la frontière C++/QML explicite.

CMakeModule-based Qt Quick baseline
cmake_minimum_required(VERSION 3.30)

project(GenyleapSample
    VERSION 0.1.0
    LANGUAGES CXX
)

add_library(genyleap_sample_core)

target_compile_features(genyleap_sample_core
    PUBLIC
        cxx_std_26
)

target_sources(genyleap_sample_core
    PUBLIC
        FILE_SET CXX_MODULES
        FILES
            src/domain/app_domain.cppm
    PRIVATE
        src/domain/app_domain.cpp
)

set_property(
    TARGET genyleap_sample_core
    PROPERTY CXX_SCAN_FOR_MODULES ON
)

find_package(Qt6 6.12 REQUIRED COMPONENTS
    Quick
    Qml
    QuickControls2
)

if(QT_KNOWN_POLICY_QTP0004)
    qt_policy(SET QTP0004 NEW)
endif()

qt_standard_project_setup(REQUIRES 6.12)

qt_add_executable(GenyleapSample
    src/bootstrap/main.cpp
)

qt_add_qml_module(GenyleapSample
    URI Genyleap.Sample
    VERSION 1.0
    QML_FILES
        ui/Main.qml
)

target_link_libraries(GenyleapSample
    PRIVATE
        genyleap_sample_core
        Qt6::Quick
        Qt6::Qml
        Qt6::QuickControls2
)

target_compile_features(GenyleapSample
    PRIVATE
        cxx_std_26
)
C++src/bootstrap/main.cpp
#include <cstdlib>

#include <QCoreApplication>
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include <QObject>
#include <QQuickStyle>
#include <QString>

int main(int argc, char* argv[])
{
    QGuiApplication application {argc, argv};

    QQuickStyle::setStyle(QStringLiteral("Basic"));

    QQmlApplicationEngine engine;

    QObject::connect(
        &engine,
        &QQmlApplicationEngine::objectCreationFailed,
        &application,
        [] {
            QCoreApplication::exit(EXIT_FAILURE);
        },
        Qt::QueuedConnection
    );

    engine.loadFromModule("Genyleap.Sample", "Main");

    return application.exec();
}
Do not use experimental import std; as a reason to abandon modules.

Les modules C++ propres au projet restent l’architecture. Les headers de bibliothèque standard peuvent rester textuels dans le global module fragment jusqu’à ce que les standard modules deviennent un choix explicite et vérifié.

Install and configure Qt Creator.

The current stable Qt Creator release resolved from Qt's official latest index is 20.0.2. The official standalone package installs the IDE only; your self-built Qt SDKs stay where they are and are registered afterward as Qt versions and kits.

macOS · official universal package

ShellQt Creator 20.0.2
cd "$HOME/Downloads"
curl -fLO "https://download.qt.io/official_releases/qtcreator/latest/qt-creator-opensource-mac-universal-20.0.2_installer.dmg"
open "qt-creator-opensource-mac-universal-20.0.2_installer.dmg"

As a convenient package-manager alternative, brew install --cask qt-creator is available, but Qt does not officially support package-manager builds of Qt Creator.

Linux · official standalone installer

x86_64

ShellLinux x86_64
cd "$HOME/Downloads"
curl -fLO "https://download.qt.io/official_releases/qtcreator/latest/qt-creator-opensource-linux-x86_64-20.0.2.run"
chmod +x "qt-creator-opensource-linux-x86_64-20.0.2.run"
./"qt-creator-opensource-linux-x86_64-20.0.2.run"

arm64

ShellLinux arm64
cd "$HOME/Downloads"
curl -fLO "https://download.qt.io/official_releases/qtcreator/latest/qt-creator-opensource-linux-arm64-20.0.2.run"
chmod +x "qt-creator-opensource-linux-arm64-20.0.2.run"
./"qt-creator-opensource-linux-arm64-20.0.2.run"

Distribution packages can lag behind the current Qt Creator release, so use the official installer when the development stack is expected to track the current release.

Windows · official standalone installer

x86_64

PowerShellWindows x86_64
Set-Location "$HOME\Downloads"
Invoke-WebRequest -Uri "https://download.qt.io/official_releases/qtcreator/latest/qt-creator-opensource-windows-x86_64-20.0.2.exe" -OutFile "qt-creator-opensource-windows-x86_64-20.0.2.exe"

Start-Process -Wait ".\qt-creator-opensource-windows-x86_64-20.0.2.exe"

ARM64

PowerShellWindows ARM64
Set-Location "$HOME\Downloads"
Invoke-WebRequest -Uri "https://download.qt.io/official_releases/qtcreator/latest/qt-creator-opensource-windows-arm64-20.0.2.exe" -OutFile "qt-creator-opensource-windows-arm64-20.0.2.exe"

Start-Process -Wait ".\qt-creator-opensource-windows-arm64-20.0.2.exe"

choco install qtcreator is also available as a package-manager alternative on Windows, with the same caveat that package-manager distributions are not the officially supported delivery path.

Register the self-built Qt SDKs

1

Prouvez d’abord le build CLI

Compiler, CMake, Ninja and the target's qt-cmake must work outside the IDE.

2

Add the Qt version

Open Preferences → Kits → Qt Versions → Add and select that Qt installation's bin/qtpaths or bin/qmake. For the desktop host, use $HOME/Qt/6.12.0/host/bin/qtpaths.

3

Créez un kit par cible

Keep Desktop, Android, iOS, iOS Simulator, WebAssembly and Remote Linux/embedded-device settings in separate kits.

4

Bind the toolchain

For each kit, select the matching compiler, CMake executable, Ninja generator, debugger, Qt version and run device. Do not let a host compiler leak into a cross-compiled target kit.

ShellVerify the host Qt before registering it
"$HOME/Qt/6.12.0/host/bin/qtpaths" --qt-version
"$HOME/Qt/6.12.0/host/bin/qtpaths" --install-prefix
"$HOME/Qt/6.12.0/host/bin/qt-cmake" --version
Raspberry Pi and other boards belong in a Remote Linux kit.

Add the board under Preferences → Devices, then create a kit that uses the matching cross compiler, self-built embedded Qt prefix and remote run device. Qt Creator can deploy and run the application over the configured device connection.

Qt WebEngine et Qt PDF ont des contraintes de version indépendantes.

Ne dérivez pas mécaniquement la version WebEngine/PDF de la version Qt de base. Leur cadence peut différer. Traitez-les comme dépendances résolues séparément et vérifiez les release notes avant de les ajouter à une baseline source.

Vérifiez chaque target avant de la déclarer prête.

ShellHost SDK
"$HOME/Qt/6.12.0/host/bin/qtpaths" --qt-version
"$HOME/Qt/6.12.0/host/bin/qtpaths" --install-prefix
"$HOME/Qt/6.12.0/host/bin/qt-cmake" --version

Then configure and build a real application with the target's own qt-cmake. For graphical applications, a core-library build is not sufficient evidence: generated MOC, QML type registration, resources, QML lint and a deterministic runtime smoke path all belong to final verification.

Références upstream actuelles.