qt.qpa.plugin: Could not load the Qt platform plugin "wayland-egl" in "" even though it was found.
-
I use Wayland on Manjaro Linux with Sway window manager, and I wrote this simple script:
#include <QApplication> #include <QDialog> #include <QPushButton> #include <QLabel> #include <QDialog> #include <Qt> int main( int argc, char **argv ) { QApplication app( argc, argv ); QDialog* d = new QDialog(); d->setModal(true); d->setWindowFlags(Qt::WindowStaysOnTopHint | Qt::FramelessWindowHint); d->setMinimumWidth(400); d->setMinimumHeight(400); d->setMaximumWidth(400); d->setMaximumHeight(400); new QLabel("Hello world", d); d->show(); return app.exec(); }
After a
qmake
,make
and./test
, I get the following error:qt.qpa.plugin: Could not load the Qt platform plugin "wayland-egl" in "" even though it was found. This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.
When executing this script under X11 with
QT_QPA_PLATFORM=xcb ./test
, I don't have any problem.Installed packages related to Qt (
yay qt5 | grep Installed
):93 community/qt5ct 0.41-1 (201.4 KiB 928.0 KiB) (Installed) 91 community/qt5-styleplugins 5.0.0.20170311-17 (417.2 KiB 1.2 MiB) (Installed: 5.0.0.20170311-16) 79 community/kvantum-qt5 0.12.1-1 (866.2 KiB 6.4 MiB) (Installed) 62 extra/qt5-x11extras 5.13.2-1 (13.1 KiB 38.3 KiB) [qt qt5] (Installed: 5.13.1-1) 59 extra/qt5-webkit 5.212.0alpha3-5 (11.6 MiB 48.9 MiB) (Installed: 5.212.0alpha3-4) 56 extra/qt5-webchannel 5.13.2-1 (61.0 KiB 211.0 KiB) [qt qt5] (Installed: 5.13.1-1) 55 extra/qt5-wayland 5.13.2-1 (923.0 KiB 5.6 MiB) [qt qt5] (Installed) 52 extra/qt5-tools 5.13.2-1 (5.7 MiB 17.9 MiB) [qt qt5] (Installed: 5.13.1-2) 51 extra/qt5-svg 5.13.2-1 (135.2 KiB 494.7 KiB) [qt qt5] (Installed: 5.13.1-1) 47 extra/qt5-sensors 5.13.2-1 (160.1 KiB 928.6 KiB) [qt qt5] (Installed: 5.13.1-1) 43 extra/qt5-quickcontrols2 5.13.2-1 (1.8 MiB 8.4 MiB) [qt qt5] (Installed: 5.13.1-1) 36 extra/qt5-location 5.13.2-1 (2.8 MiB 11.8 MiB) [qt qt5] (Installed: 5.13.1-1) 34 extra/qt5-graphicaleffects 5.13.2-1 (70.4 KiB 551.3 KiB) [qt qt5] (Installed: 5.13.1-1) 30 extra/qt5-declarative 5.13.2-1 (4.0 MiB 20.8 MiB) [qt qt5] (Installed: 5.13.1-1) 26 extra/qt5-base 5.13.2-1 (12.1 MiB 61.2 MiB) [qt qt5] (Installed: 5.13.1-2) 19 extra/python-sip-pyqt5 4.19.19-1 (52.1 KiB 146.0 KiB) (Installed) 17 extra/python-pyqt5 5.13.2-1 (3.3 MiB 23.5 MiB) (Installed: 5.13.1-1) 15 extra/pyqt5-common 5.13.2-1 (508.1 KiB 4.7 MiB) (Installed: 5.13.1-1) 13 extra/polkit-qt5 0.113.0-1 (73.1 KiB 321.0 KiB) (Installed)
Installed packages related to Wayland (
yay wayland | grep Installed
):144 aur/wev-git r3.47d1739-1 (+0 0.00%) (Installed) 78 aur/wob 0.4-1 (+4 1.94%) (Installed: 0.2-1) 34 multilib/lib32-wayland 1.17.0-1 (46.5 KiB 192.0 KiB) (Installed) 32 community/wlroots 0.8.1-1 (248.2 KiB 960.0 KiB) (Installed) 27 community/waybar 0.8.0-4 (248.3 KiB 806.0 KiB) (Installed) 26 community/swaylock 1.4-2 (28.4 KiB 153.0 KiB) (Installed) 25 community/swayidle 1.5-1 (12.3 KiB 95.0 KiB) (Installed) 24 community/swaybg 1.0-3 (14.5 KiB 46.0 KiB) (Installed) 23 community/sway 1:1.2-5 (4.8 MiB 5.5 MiB) (Installed) 22 community/slurp 1.2.0-1 (13.7 KiB 74.0 KiB) (Installed) 21 community/mako 1.4-1 (35.8 KiB 140.0 KiB) (Installed) 16 community/grim 1.2.0-2 (12.2 KiB 33.0 KiB) (Installed) 15 community/glfw-wayland 3.3-2 (92.5 KiB 482.0 KiB) (Installed) 12 community/bemenu 0.1.0-1 (44.9 KiB 215.0 KiB) (Installed) 11 extra/xorg-server-xwayland 1.20.5-4 (775.2 KiB 2.0 MiB) [xorg] (Installed: 1.20.5-2) 10 extra/wayland-protocols 1.18-1 (59.5 KiB 407.0 KiB) (Installed) 8 extra/wayland 1.17.0-1 (117.7 KiB 736.0 KiB) (Installed) 7 extra/sddm 0.18.1-1 (3.4 MiB 4.7 MiB) (Installed) 6 extra/qt5-wayland 5.13.2-1 (923.0 KiB 5.6 MiB) [qt qt5] (Installed) 4 extra/libva 2.5.0-1 (145.1 KiB 715.0 KiB) (Installed) 2 extra/kwayland 5.64.0-1 (2.7 MiB 6.8 MiB) [kf5] (Installed) 1 extra/egl-wayland 1.1.4-1 (21.6 KiB 62.0 KiB) (Installed)
-
@roipoussiere said in qt.qpa.plugin: Could not load the Qt platform plugin "wayland-egl" in "" even though it was found.:
qt.qpa.plugin: Could not load the Qt platform plugin "wayland-egl" in "" even though it was found.
I finally fixed this by deploying the libs needed by wayland-egl plugin:
the lib "libQt5WaylandClient.so.5" should be included in the deployed package. which used by the plugin.
just FYI.