Introduction
This is a guide for configuring the Qt-Creator to use cross-compiled Qt libraries for the Raspberry Pi 4 and to create applications for the Raspberry.
Preconditions
Raspberry Pi OS Lite
Install Raspberry Pi OS Lite on a Raspberry Pi 4 or on a Raspberry Compute Module 4 as described in my blog post Installing Raspberry Pi OS on Raspberry Compute Module 4.
Qt 5.15.2 on Ubuntu 20 LTS
Configure Raspberry Pi OS Lite on a Raspberry Pi 4 or install Raspberry Pi OS on Raspberry Compute Module 4 as in my blog post and build the Qt libraries as in my blog post Qt 5.15 cross compile for Raspberry Compute Module 4 on Ubuntu 20 LTS.
Configuration Qt-Creator
You should have a working Qt creator installed on an Ubuntu 20. Instructions on how to do this can be found at Qt or in various forums or tutorials.
In addition, you should have created a Raspberry Pi 4 or a Raspberry Compute Module 4 with Raspberry Pi OS Lite and the corresponding Qt libraries, a cross-compiler and the cross-compiled libraries for the Raspberry Pi 4 as described in the prerequisites.
The paths used below for the different configurations correspond to the paths from the two previous blog posts.
My QtCreator version used is version 4.13.3.
Create Device
In the first step, we create a new device. To do this, call up "Options" in the menu under "Tools" and select "Devices" in the left column. Then use "Add" to create a new device "Generic Linux Device". Give the device a name - here RaspberryPi4-Qt-5.15 -, enter the IP address under "Host name" and typically enter "pi" under "Username" for the Raspberry.
Then you can use the "Test" button to test the connection to the Raspberry. If "Device test finished successfully." is not returned here, you have to check the settings and test whether the Raspberry is really reachable with these parameters.



- Name: assign your own name (this will later be used to select the device under the "Project" settings)
- Device type: "Generic Linux Device"
- Device: select the newly created device
- Sysroot: select the sysroot directory created in the previous blog post
- Compiler: select the two newly created compilers
- Qt version: select the newly created Qt version