Compiling Qt application on Torizon qt5-wayland container


We are trying to use the supplied qt5-wayland container for compiling and running our Qt app. What I don’t understand: There are no Qt header files, qmake, moc, pic binaries are also not there. How can one use this container to compile a Qt app? I have seen that there is the Visual studio code extension. However, we would like to compile on the command line. Is this possible?

Hi @markus,

Welcome to our community :rocket: ! Can you please share more details of your setup? I suppose you’re using Torizon, right? However, which module are you using?

I suppose you talk about the container presented on this page, right? Qt Debian Container for Torizon | Toradex Developer Center. This container is intended to run your QT Application but not to develop it.

You can compile your application using CLI on your host PC via Arm emulation or cross-compilation, and put the executable in a Docker image via a Dockerfile. We’d recommend you, however, to use the extension if possible, as it abstracts some procedures of the general build process in order to help customers in development. The extension goes from generating sample containers, docker-compose files and it can even push containers to the docker hub directly.

Hi @gclaudino.tx ,

Thanks for your answer. I understand. Would it not be useful if Toradex would also provide a container to build the applications? Such a container could also be used in automated build pipelines, e.g. Gitlab

1 Like

Hi @markus,

I’ll check this possibility internally and I’ll come back to you soon.

Best regards,

Hi @markus!

Actually, there is already a container to build applications when you use the VS Code extension.

When you create a new C++/Qt application on VS Code, you can navigate to appconfig_0/work/Dockerfile_SDK.debug to get the basic container name. You will find out that is this one:

And you will see that there is a Dockerfile available on Github for this basic container: GitHub - toradex/debian-cross-toolchains: Debian based containers for development host containing cross-compiling toolchains.

From appconfig_0/work/Dockerfile_SDK.debug you get more configuration for the actual SDK container that is built for your project.

Does it help you?

By the way, could you please explain your use case? Understanding your use case (why you need to compile from the command line) is a great opportunity to enhance the developer experience.

Best regards,