QT GUI (C++, C, QML) How to get file to work on raspberri pi 3
-
wrote on 18 Oct 2018, 20:38 last edited by
Hi,
I'm pretty new at this but I have developed a decent code using QT and I want to run it using raspberry pi 3 on a touch screen display.
I'm using raspbian and am really new to this. Is there just an easy way to save the file on the raspberry memory card or call it from github and just have the code run?
Any help is appreciated.
Thank you
-
Hi and welcome to devnet,
The most straightforward is to build your application directly on the Rpi3 using the Qt version provided by Raspbian.
-
Hi and welcome to devnet,
The most straightforward is to build your application directly on the Rpi3 using the Qt version provided by Raspbian.
-
@SGaist Thank you for your reply.
Is it possible to transfer the file from my computer to the raspberry pi memory card then open it using QT version provided by raspbian? Because I already built the application.
Thanks
wrote on 19 Oct 2018, 03:41 last edited by@slama10 Did you build it for the Pi? It requires a cross compile since the architecture will be different than whatever you used on your desktop.
You can transfer the files in a number of ways, personally I would use scp. Remember that if you built them with your normal desktop compiler, the binaries will not work on the Pi anyway.
-
@slama10 Did you build it for the Pi? It requires a cross compile since the architecture will be different than whatever you used on your desktop.
You can transfer the files in a number of ways, personally I would use scp. Remember that if you built them with your normal desktop compiler, the binaries will not work on the Pi anyway.
wrote on 19 Oct 2018, 04:12 last edited by@ambershark I was able to do what @SGaist suggested and got QT creator on my raspberry pi. can I just email myself the code, download it on the raspberry, open it using qtcreator and run it? Will that work?
Thanks for your help!
-
@ambershark I was able to do what @SGaist suggested and got QT creator on my raspberry pi. can I just email myself the code, download it on the raspberry, open it using qtcreator and run it? Will that work?
Thanks for your help!
wrote on 19 Oct 2018, 04:13 last edited by@slama10 Sure, you just need to get the code on the Pi. You can use scp or any other method, email is fine too if you can access your email on the Pi. That's a lot of work just to copy some files though. ;)
Once the code is on there you can build it in the Qt Creator on the Pi and run it there.
-
@SGaist Thank you for your reply.
Is it possible to transfer the file from my computer to the raspberry pi memory card then open it using QT version provided by raspbian? Because I already built the application.
Thanks
@slama10 said in QT GUI (C++, C, QML) How to get file to work on raspberri pi 3:
Is it possible to transfer the file from my computer to the raspberry pi memory card then open it using QT version provided by raspbian?
It's not that easy. Your PC has a x86_64 CPU, Raspberry Pi has an ARM CPU. You can't execute binaries for x86_64 on an ARM CPU. That means you need to build your app on your x86_64 PC but for ARM - this is called cross compilation (as @ambershark mentioned). For that take a look at https://wiki.qt.io/Raspberry_Pi_Beginners_Guide
@SGaist suggested to build your app directly on your Pi. This is way easier than cross compilation, because you don't need to set up a cross compilation environment and cross compile Qt. Install compiler and Qt on your Pi, copy your source code to it and build.
-
As for copying your code, you have several solutions between rsync, scp, git, USB drive, etc.
1/8