Qtrpi

From Qt Wiki
Revision as of 10:04, 3 April 2017 by Guillaume Lazar (talk | contribs) (Page creation about the open-source project: qtrpi)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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

How to build a Raspberry Pi 3 application from your desktop Qt Creator (Youtube video)

https://www.youtube.com/watch?v=1d2bh7iUKNc

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

More information

References