This application failed to start because it could not find or load the Qt platform plugin "xcb".

2023-04-27,,

1.  copy      libQt5DBus.so.5

2.  add    QT_PLUGIN_PATH

blog.csdn.net/windows_nt/article/details/24205671

his application failed to start because it could not find or load the Qt platform plugin "xcb".

分类: Qt linux 2014-04-21 00:02 7793人阅读 评论(5) 收藏 举报
linux Qt5 程序打包

linux系统下Qt5编译好的程序在未安装Qt的系统下运行会报以下错误:

This application failed to start because it could not find or load the Qt platform plugin "xcb".

Reinstalling the application may fix this problem.

出现这个错误,主要是因为qt5为了在多平台下更方便移植,使用了一种新的技术-----platform abstraction system (QPA),而它中的库又依赖于Qt5中的一个库文件libQt5DBus.so.5,所以,只要打包时只要加上这个文件就可以了。

linux下qt5程序打包步骤如下

1、把以下7个库文件放到/usr/lib目录下

libQt5Widgets.so.5
    libQt5Gui.so.5
    libQt5Core.so.5
    libicui18n.so.51
    libicuuc.so.51
    libicudata.so.51

libQt5DBus.so.5

2、拷贝Qt5安装目录中的platforms目录,使它和你的Qt程序同级目录

现在你可以双击你的程序运行了呵呵

bbs.csdn.net/topics/390633699

This application failed to start because it could not find or load the Qt platform plugin "xcb".的相关教程结束。

《This application failed to start because it could not find or load the Qt platform plugin "xcb"..doc》

下载本文的Word格式文档,以方便收藏与打印。