Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.
Qtrpi
Jump to navigation
Jump to search
Introduction
To deploy Qt applications on a Raspberry Pi, you need to have cross-compiled your Qt dependencies. QtRpi is an open-source project that offers you:
- All you need to cross-compile the Qt framework yourself (optional)
- Precompiled Qt binaries for your Raspberry Pi
- An easy-to-use environment to cross-compile your Qt Raspberry Pi application from your computer
Requirements
- A 64-bit Linux host computer
- A SSH reachable RaspberryPi
Installation
- init-qtrpi-minimal: Configure your host computer to be able to cross-compile Qt 5.7.0 applications for your Raspberry Pi 3. Downloads ready-to-use Qt binaries for the Raspberry Pi and a minimal sysroot
- deploy-qtrpi: Deploy the compiled Qt binaries on your Raspberry Pi
git clone https://github.com/neuronalmotion/qtrpi.git
cd qtrpi
export QTRPI_QT_VERSION='5.7.0'
export QTRPI_TARGET_DEVICE='linux-rpi3-g++'
export QTRPI_TARGET_HOST='pi@192.168.1.12'
./init-qtrpi-minimal.sh
./deploy-qtrpi.sh --prepare-rpi
Usage in CLI
Cross-compile your project for a Raspberry Pi with the CLI:
cd myproject
/opt/qtrpi/bin/qmake-qtrpi
make
Usage in QtCreator
Cross-compile Qt applications for your Raspberry Pi 3 - 2. Configure Qt Creator (Youtube video)
Supported version
Raspberry Pi: 1, 2 and 3
Qt: Qt 5.7.0, Qt 5.6.2 (LTS)
Qt Modules: Qt Base, Qt Declarative (Quick 2), Qt Quick Controls, Qt Quick Controls 2, Qt 3D, Qt Serial Port, Qt SVG