I am working on a Qt project for my pi and I have successfully managed to follow this guide to set up a tool chain from Ubuntu to the Rpi:


However, now I am having troubles deploying qt programs onto the rpi. On the guide, I followed these steps to put a example on the pi, but I have been unable to recreate it with my files:

  1. Build an example:
cd qtbase/examples/opengl/qopenglwidget (the example in a folder)
scp qopenglwidget pi@IP:/home/pi

I have also tried this but I can't seem to figure out how to get the files on the pi. I can find them on my laptop however, so I know they are being created just not put where I want.

Once Qt is on the device, Qt Creator can be set up to build, deploy, run and debug Qt apps directly on the device with one click.

Go to Options -> Devices
    Generic Linux Device
    Enter IP address, user & password

Go to Options -> Compilers
    Compiler path: ~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++

Go to Options -> Debuggers

Go to Options -> Qt Versions
  Check if an entry with ~/raspi/qt5/bin/qmake shows up. If not, add it.

Go to Options -> Build & Run
      Generic Linux Device
      Device: the one we just created
      Sysroot: ~/raspi/sysroot
      Compiler: the one we just created
      Debugger: the one we just created
      Qt version: the one we saw under Qt Versions
      Qt mkspec: leave empty

Any guidance would be extremely helpful.

I also am using a PiScreen touchscreen and so need the program to come out of the GPIOs and not the HDMI. I read that I need to set QT_QPA_EGLFS_FB to /dev/fb1, but am unsure where to do that. Under 'Run Environment' of the 'Build and Run' I found a system environment section. Would this be the correct spot to add it?

Thanks a bunch

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.