Build QtCreator 13.0 with Qt 6 on Raspberry Pi

How to build a native Qt Creator 13.0 to run on a Raspberry Pi (bookworm versions) using Qt 6 branch.

Qt Creator 13.0.0 running on a Raspberry Pi, "About Qt Creator" dialog is open

This tutorial will explain how to build a native QtCreator 13.0 to run on a Raspberry Pi (bookworm versions) using Qt 6.15 or later. 

First steps

Remove any installed Qt packages

For some reason installed Qt libraries might cause link failures, so we need to get rid of them first. So if you have an older Qt 5 already installed from distro packages, remove them first with apt:

apt remove <list-all-installed-qt-packages-here>

Build and install Qt 6.15 or later

First you need to various build tool and of course build Qt 6 for your Raspberry Pi, for example if using Qt 6.15, follow this Qt build tutorial for instructions on how to install required packages and building of Qt 6. 

When you have done that successfully, come back here.

Install required packages

No need to install other that Qt 6 and what it requires for building.

Build Qt Creator

Download Qt Creator source archive

Download the source archive of Qt Creator from the Qt download site:

wget https://download.qt.io/official_releases/qtcreator/13.0/13.0.0/qt-creator-opensource-src-13.0.0.tar.xz

Unpack the Qt Creator sources from the archive

Extract the source with tar

tar xf qt-creator-opensource-src-13.0.0.tar.xz

Configure the Qt Creator build

Run cmake against the sources. We will assume that Qt 6.6 is installed in /opt/Qt/6.6 (and if not, adjust the path for your installation)

mkdir qt-creator-build
cd qt-creator-build
cmake -DCMAKE_BUILD_TYPE=Release -G Ninja -DCMAKE_PREFIX_PATH=/opt/Qt/6.6 ../qt-creator-opensource-src-13.0.0

Compile Qt Creator

Next start the compilation. This will take a while

cmake --build . --parallel 4

Install Qt Creator

Next install the just built Qt Creator, you can use whatever path you like, I prefer installing custom software under /opt.

cmake --install . --prefix /opt/Qt/QtCreator

Run Qt Creator

You should now be able to start Qt Creator with:

/opt/Qt/QtCreator/bin/qtcreator