Skip to the text
KDOS
Menu
kdos.dev KDOS from Scratch KDOS 0.2 · 4dd4a10 · 2026-11-30 Contents Index

285.3. qt-creator-20.0.2

The Qt IDE for C++, QML and Python, with a clangd code model

Version 20.0.2, release 2
Shelf editors — Text editors, IDEs, notebooks and REPLs
Phase 44_apps (Applications), 78 of 422 in build order
Licence GPL-3.0-only WITH Qt-GPL-exception-1.0
Homepage https://www.qt.io/product/development-tools
Build time 77.3 SBU
Installed size 165.7 MiB in 2705 files
Recipe ports/core/editors/qt-creator/kpkgbuild

About

Qt Creator is the Qt project’s IDE for C++, QML and Python: an editor with a clangd code model, CMake and qmake project support, a debugger front end for gdb, the Clang-Tidy and Clazy runners, and a perf profiler. In KDOS its code model uses the clang port’s libraries at build time and its clangd at run time. The help viewer shows Qt documentation (.qch files) through the bundled litehtml renderer, so the port needs no QtWebEngine. No port installs any .qch file, as QDoc is not built in qt6-qttools, so Help mode and the Welcome page’s example list start empty.

Sources

Dependencies

Depends on: cmake, ninja, python3, llvm, clang, libarchive, yaml-cpp, elfutils, zstd, qt6-qtbase, qt6-qtdeclarative, qt6-qtsvg, qt6-qttools, qt6-qt5compat, qt6-qtserialport, qt6-qtshadertools, qt6-qtwayland, gdb, qt6-qtcharts, qt6-qthttpserver.

Required by: no port names it.

Patches

build.sh applies these; kpkg applies nothing by itself.

Installation

From the repository root, inside the build container, this is the line kdosbuild runs for the port:

script/chroot/exec.sh bash -c 'source script/phases/44_apps/phase.env && kpkg install qt-creator'

What kpkg does

kpkg runs these steps, in this order, as root inside the chroot. The port directory is /ports/core/editors/qt-creator.

1. Verify every declared source. Each file a sha256 = line names, found in the port directory or in /var/cache/kpkg/sources, must hash to its line; a mismatch stops the build before anything is unpacked.

cd /ports/core/editors/qt-creator
echo 'f0505278792454d8fa1af029d05878b112773dc9d67503c8f9671cb67b07bfea  qt-creator-20.0.2.tar.xz' | sha256sum -c -

2. Unpack. The work directory is emptied and the first source is unpacked into $SRC with its top directory stripped; any later tarball lands unstripped beside it in $SRC_ROOT, and a file that is not a tarball is copied into $SRC.

SRC_ROOT=/var/cache/kpkg/work/qt-creator
SRC=$SRC_ROOT/qt-creator-20.0.2
PKG=$SRC_ROOT/pkg
rm -rf "$SRC_ROOT"
mkdir -p "$SRC" "$PKG"
tar --no-same-permissions --warning=no-unknown-keyword -xf qt-creator-20.0.2.tar.xz -C "$SRC" --strip-components=1

Every config.guess and config.sub older than automake’s is then replaced with automake’s, so a configure script recognises the musl target.

3. Build. build.sh is sourced in a subshell under set -e, from $SRC, with name, version, release and the recipe’s helpers _series and the five paths PKGNAME, PORT_SRC, SRC_ROOT, SRC and PKG set as shell variables. Its body, verbatim:

patch -p1 -i "$PORT_SRC/no-execinfo.h.patch"
patch -p1 -i "$PORT_SRC/no-malloc_trim.patch"

cmake -S . -B build -G Ninja \
	-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
	-DCMAKE_BUILD_TYPE=Release \
	-DCMAKE_INSTALL_PREFIX=/usr \
	-DCMAKE_INSTALL_LIBDIR=lib \
	-DBUILD_WITH_PCH=OFF \
	-DWITH_TESTS=OFF \
	-DWITH_DOCS=OFF \
	-DBUILD_QBS=OFF \
	-DWITH_QMLDESIGNER=OFF \
	-DBUILD_DESIGNSTUDIO=OFF \
	-DQTC_USE_INTERNAL_TASKTREE=ON \
	-DQTC_CLANG_BUILDMODE_MATCH=ON \
	-DBUILD_EXECUTABLE_CMDBRIDGE=OFF \
	-DBUILD_PLUGIN_CLANGFORMAT=OFF \
	-DBUILD_PLUGIN_COPILOT=OFF \
	-DBUILD_PLUGIN_COMPILEREXPLORER=OFF \
	-DBUILD_PLUGIN_GITLAB=OFF \
	-DBUILD_PLUGIN_AXIVION=OFF \
	-DBUILD_PLUGIN_EXTENSIONMANAGER=OFF \
	-DBUILD_PLUGIN_LEARNING=OFF \
	-DBUILD_PLUGIN_UPDATEINFO=OFF \
	-DBUILD_HELPVIEWERBACKEND_QTWEBENGINE=OFF \
	-DHELPVIEWER_DEFAULT_BACKEND=litehtml \
	-DCMAKE_REQUIRE_FIND_PACKAGE_Clang=ON \
	-DCMAKE_REQUIRE_FIND_PACKAGE_LibArchive=ON \
	-DCMAKE_REQUIRE_FIND_PACKAGE_yaml-cpp=ON \
	-DCMAKE_REQUIRE_FIND_PACKAGE_elfutils=ON \
	-DCMAKE_REQUIRE_FIND_PACKAGE_Zstd=ON \
	-DCMAKE_DISABLE_FIND_PACKAGE_LibRustcDemangle=ON \
	-DCMAKE_DISABLE_FIND_PACKAGE_LibDDemangle=ON
cmake --build build
DESTDIR=$PKG cmake --install build
test -x "$PKG/usr/bin/qtcreator"
ls "$PKG"/usr/lib/qtcreator/plugins/libClangCodeModel.so >/dev/null

cat > "$PKG/usr/share/applications/org.qt-project.qtcreator.desktop" <<'DESKTOP'
[Desktop Entry]
Type=Application
Name=Qt Creator
GenericName=C++ and Qt IDE
Comment=Develop C++, QML and Python applications with Qt
TryExec=qtcreator
Exec=qtcreator %F
Icon=QtProject-qtcreator
Terminal=false
StartupWMClass=org.qt-project.qtcreator
Categories=Development;IDE;Qt;
Keywords=ide;c++;qt;qml;cmake;debugger;designer;qtcreator;
DESKTOP
chmod 644 "$PKG/usr/share/applications/org.qt-project.qtcreator.desktop"
test -e "$PKG"/usr/share/icons/hicolor/48x48/apps/QtProject-qtcreator.png

The switches, and why each is set:

The common switches of each build system are explained in the Flag glossary.

4. Package. kpkg removes libtool archives, the info directory index, mimeinfo.cache and every fonts.dir from $PKG, copies the source’s licence files into /usr/share/licenses/qt-creator, prunes what the image does not ship, lints the tree and rolls it reproducibly:

tar --sort=name --format=gnu --numeric-owner --owner=0 --group=0 \
    --mtime=@$SOURCE_DATE_EPOCH \
    --use-compress-program='xz -9 -T0 --block-size=32MiB --no-adjust' \
    -cf qt-creator-20.0.2-2.tar.xz -C "$PKG" .

5. Adopt. kpkgadd installs the package’s files over the root, refusing a path another package owns, records the file list in /var/lib/kpkg/db/qt-creator, and runs the triggers its paths call for.

Contents

Installed programs: qtcreator, qtcreator.sh.

Installed directories: /usr/lib/qtcreator, /usr/libexec/qtcreator, /usr/share/licenses/qt-creator, /usr/share/qtcreator.

Notes

no-execinfo.h.patch and no-malloc_trim.patch are Alpine’s musl patches. musl has no execinfo.h, so the backtrace on a failed assertion is compiled out, and no malloc_trim, so the call that returns freed memory to the system a minute after a key or mouse press is removed.

Code Paster, a front end to paste services, stays built: the version-control plugin names it as a recommended plugin, and configure stops if its target is missing.

Upstream’s menu entry is replaced. The program sets its desktop file name, and so its Wayland app_id, to org.qt-project.qtcreator, which the entry gives as StartupWMClass. Other editors here claim the C and C++ source types too, so the entry claims no types and mimeapps.list chooses.