pyqt5连接并问题,怎么解决

如题所述

第1个回答  2017-10-24
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程序同级目录
现在你可以双击你的程序运行了呵呵
相似回答