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:
- Build an example:
cd qtbase/examples/opengl/qopenglwidget (the example in a folder) ~/raspi/qt5/bin/qmake make 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 Add Generic Linux Device Enter IP address, user & password Finish Go to Options -> Compilers Add GCC Compiler path: ~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-g++ Go to Options -> Debuggers Add ~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-gdb 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 Kits Add 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