Qt version selection for packaging qt applications into snap


I am trying to package a qt application into a snap. However, the qt version that the snap qt plugin uses a qt version that is too old.

I have been looking into posts like this, but it is too clumsy.

Is there a better way to select a qt version when building qt applications?

Thank you in advance

I don’t know other ways, apart from the one you talk about, to choose the QT version.

The other option that you have is use the core18 base to get QT 5.9.5 “out of the box”, if that’s new enough it’s an option.

@pachulo I need a specific version eg. Qt 5.11.0 to package my application, however this is failing

I have the same problem, I also need to use 5.11
But a good example how to solve correctly these dependencies, I also could not show)
There is no generally good example from developers.

@sektorct @jalim did you try to do something like what @Trevinho does for the telegram-snap?


No it’s not that)
You build the application in IDE QTCreator, use the library version 5.11.
After you need to copy the libraries what you need to the snap package. and tell the application to use version 5.11, not something that will the path in ${SNAP}/usr/lib…
This is a link to the archive with my little project written on 5.11
In the archive, the very version is also located.
So you could build a snap package so that it works and runs?)

Another problem, snap package when I collect it, why does it copy itself to the system from the system, but they do not need me.
With this, too, it is not clear how not to let him copy them.
I think @jalim has same problem.

Could you please let me know how can tell the QT application to use a specific QT version?
We are using Qt 5.14.2 version for our Qt application. We want to run this
application in Kiosk mode on Ubuntu 18.04 version. For that we are using
snapcraft application. Snapcraft application creates a snap container which
runs on ubuntu in Kiosk mode.

Following steps we have followed.

In>stall mir-app kiosk environment on Ubuntu 18.04.
Install snapcraft container application setup.
Run Qt 5.14.2 application in mir-kiosk environment.

Problem we are facing is in running the application after creating snap for
the application. We are able to create the snap package of qt application but
when it tries to run, it dynamically bind to Qt 5.9.2. We want to bind it to

Following is the error we are getting.
user@user-Latitude-3490:~$ snap run qt5-application
gnu/libQt5Core.so.5: version `Qt_5.14’ not found (required by ControlSW)

If possible can you share this link https://www.dropbox.com/s/25mmcm51ih0dsfd/pt_snap_new.tar.gz?dl=0