Hello.
I’m trying to launch a Qt application.
This is the error that the application
qt.qpa.plugin: Could not find the Qt platform plugin “xcb” in “”
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
This’s snapcraft.yaml for app
name: managetime
version: "0.1.0"
summary: timer
description: |
Application for time management
confinement: strict
architectures: [amd64]
apps:
managetime:
command: bin/run.sh $SNAP/bin/ProjectTimer
plugs: [home, unity7, x11, opengl, pulseaudio, wayland]
parts:
files:
plugin: dump
source: scripts
source-type: local
build-attributes: [keep-execstack]
integration:
plugin: nil
stage-packages:
- libc-bin
- libclutter-1.0-0
- libxkbcommon0
- ttf-ubuntu-font-family
- dmz-cursor-theme
- libglib2.0-0
- light-themes
- shared-mime-info
- libgdk-pixbuf2.0-0
- libsqlite0
- libsqlite3-0
- libgl1-mesa-dev
- qml-module-qtqml-models2
- qml-module-qt-labs-folderlistmodel
- qml-module-qtquick-xmllistmodel
In source: scripts has 2 catalogs. bin(run.sh, ProjectTimer) and Qt(plugins, libraries)
in script run.sh write paths where plugins, libraries.
export LD_LIBRARY_PATH=$SNAP/Qt/5.11.0/gcc_64/lib:$LD_LIBRARY_PATH
export QT_PLUGIN_PATH=$SNAP/Qt/5.11.0/gcc_64/plugins
export QML2_IMPORT_PATH=$QML2_IMPORT_PATH:$SNAP/Qt/5.11.0/gcc_64/qml
export QT_QPA_PLATFORM_PLUGIN_PATH=$SNAP/Qt/5.11.0/gcc_64/plugins/platforms/
export QT_QPA_PLATFORM=xcb
export QT_QPA_PLATFORMTHEME=appmenu-qt5
Tell me please, where can I have a mistake? All weekend try to find and fix this error.
Or maybe the snapcraft.yaml for the application is not compiled correctly? If anyone see, please correct.
Thx.