How to develop Qt app for RPI using Visual Studio on Windows 10 platform?
-
Hi:
I'm learning Qt to develop apps for Linux desktop env,I have a Raspberry Pi 4B host, so I use it as target platform;because I had using Visual Studio for many years,and new vs version support dev linux app,I decide to continue using vs as my dev tool, but I dont know how to setup the cross platform dev environment; my goal is not to cross-compile because I heard it is diffecult on Windows,I just want vs to copy all the code to rpi host, and then commands rpi to compile,run,and debug the Qt app,from my superficial understanding of vs developing linux app I think this should be possible;
I had installed Qt 5.11.3 on Windows and RPI,then how can I setup the development environment?Where can I get the doc and examples about it?
-
Hi:
I'm learning Qt to develop apps for Linux desktop env,I have a Raspberry Pi 4B host, so I use it as target platform;because I had using Visual Studio for many years,and new vs version support dev linux app,I decide to continue using vs as my dev tool, but I dont know how to setup the cross platform dev environment; my goal is not to cross-compile because I heard it is diffecult on Windows,I just want vs to copy all the code to rpi host, and then commands rpi to compile,run,and debug the Qt app,from my superficial understanding of vs developing linux app I think this should be possible;
I had installed Qt 5.11.3 on Windows and RPI,then how can I setup the development environment?Where can I get the doc and examples about it?
@ItalianSC Use qt creator on Linux and it is even simpler than VS. As I know, VS is not available on Linux. Although VS code does exist on Linux, I guess very few people use it to compile C++ code. I use it as editor sometimes and even do not know how to use it to build Qt project. I think QtCreator is a much better choice for Qt apps and you can pick it up very quickly. You can install it.
-
What I do is use Windows Subsystem for Linux - part of Win 11 and later releases of Win 10. Then you are down to cross-compiling Linux to RPI which is well-documented.
Straight Windows to RPI is doable, but an order of magnitude more complex to setup.
-
Hi:
I'm learning Qt to develop apps for Linux desktop env,I have a Raspberry Pi 4B host, so I use it as target platform;because I had using Visual Studio for many years,and new vs version support dev linux app,I decide to continue using vs as my dev tool, but I dont know how to setup the cross platform dev environment; my goal is not to cross-compile because I heard it is diffecult on Windows,I just want vs to copy all the code to rpi host, and then commands rpi to compile,run,and debug the Qt app,from my superficial understanding of vs developing linux app I think this should be possible;
I had installed Qt 5.11.3 on Windows and RPI,then how can I setup the development environment?Where can I get the doc and examples about it?
- Install Visual Studio that supports Linux development.
- Open Visual Studio Installer and add the "Linux development with C++" workload if you haven't already.
- Set Up SSH between your Windows machine and Raspberry Pi. You'll need this for remote development and debugging. Ensure you can connect to your Raspberry Pi via SSH from Visual Studio.
- You mentioned that you've already installed Qt on both Windows and Raspberry Pi. Ensure you have the same version on both platforms.
- In Visual Studio, create a new Qt project. Choose the appropriate template based on your project type (Qt Widgets, Qt Quick, etc.).
- In your Qt project settings, configure the deployment settings to specify your Raspberry Pi as the target. Set up the remote path on the Raspberry Pi where the compiled application will be copied.
- Build your Qt project in Visual Studio. It will compile the code and then copy it to your Raspberry Pi over SSH. You can also configure debugging to work with your Raspberry Pi.
- Launch your Qt application on your Raspberry Pi and debug it from Visual Studio.
As for documentation, the Qt documentation gives detailed information on setting up cross-compilation and remote deployment. Remember cross-platform development has some nuances. So it is better to trust cross-platform development experts for such kinds of projects.
-
This post is deleted!