How to Deploy from Qt Creator to a Container

I am able to follow this guide and get the example Qt applications to run inside containers. But how do I deploy my own application to a container?

From the above guide and this demo video (@47:45), I came up with the following docker command to create a container with the Qt runtime:

docker run --name=boot2qt_test -d -it --privileged -p2222:22 -p10000-10100:10000-10100 -v /tmp:/tmp torizon/arm32v7-debian-qt5-wayland

I then attempted to add a Device in Qt Creator following these instructions. I gave it the IP address of my Apalis board with 2222 as the port. But the connection test fails:

Connecting to host…
Checking kernel version…
uname failed.

Checking if specified ports are available…
Error gathering ports: Remote process crashed: Remote process crashed.

Device test failed.

I tried to connect to the container over SSH but that failed. So I connected to the container’s bash shell via Docker. From this Qt blog post, I see that Qt Creator requires OpenSSH. But apt was “Unable to locate package openssh”. uname and systemctl are similarly unavailable. So this is a “minimal container” as advertised. But how does it interact with the Qt development environment?

What is the workflow? How do I develop an application in Qt and then deploy it to a container to run on Torizon? Is there a guide to deploying to containers that I’ve overlooked?

Greetings @embedded.kyle,

It is a future goal of ours to have full integration with the Qt creator IDE. Unfortunately at the current time we are still quite a ways off from this goal. In the meantime we do have initial support for Qt via our Visual Studio Code extension.

Please note that this Qt support is only for Qt applications written in C/C++. This is actually a fairly new feature for our extension being released just this week. With that being said some of the documentation on this isn’t complete yet so I can’t point you towards an article yet. The gist I can give you is the following:

To create a new project you should:

Press F1 to open the command bar
select Torizon C/C++: Create C/C++ application
set the name of your new application and choose the folder when it will be created
choose one of the Qt-based templates

Three templates are provided:

Qt Core Sample: for console applications not using any UI or generating UI elements from code
Qt Widgets Sample: for graphical applications that use QtWidgets
Qt QML Sample: for applications using QtQuick/QML-based UI

We will over time improve upon this support but for the time being this is the initial and only support we have for creating containerized Qt applications in a container via an IDE.

Let me know if you have any further questions about this feature of our extension. I’ll also check on my side when more proper documentation for this will be released or if I could get you some early documentation to work with.

Best Regards,
Jeremias