Migrating Qt5 app to Qt6

Hi,

I’m the maintainer of the LibrePCB snap, see snapcraft.yaml. It uses Qt5 and snapcraft-desktop-helpers.

Now we need to migrate to Qt6. It seems snapcraft-desktop-helpers does not support Qt6 and is considered obsolete. As far as I understand, the recommended way to build Qt6 apps is through the kde-neon-6 extension. But there’s not even a Wiki page about it, and it seems it only supports x86_64 architecture. In that case it’s not an alternative to snapcraft-desktop-helpers at all. Also it doesn’t support core24.

So I wonder, how can we package a Qt6 app for all architectures?

I tried to adjust snapcraft-desktop-helpers by changing filepaths from Qt5 to Qt6, but without success. In the end, I get the runtime error:

qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""

I verified the XCB plugin is contained in the Snap but I don’t understand why it’s not found. So, any tips what’s the way to go for packaging Qt6 apps?

Here’s the snapcraft.yaml of my Qt6 attempts: librepcb-snap/snap/snapcraft.yaml at qt6 · LibrePCB/librepcb-snap · GitHub

I figured out since 2 years there’s a PR open to add Qt6 support to snapcraft-desktop-helpers:

This PR saved me to package LibrePCB, it seems to work fine (though only with core22). Without that PR I’d be screwed (already spent many hours without success).

Nevertheless it can’t be the solution to use an unofficial patch to a repository considered legacy to package Qt6 apps. So my question remains: How to package Qt6 apps?