Qt报错:qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch).....

Posted kerngeeksund

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Qt报错:qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch).....相关的知识,希望对你有一定的参考价值。

Qt编译完后运行程序报如下错误

17:46:32: Starting /home/wyl/Documents/Qtcode/RSViewer/RSViewer_build/RSViewer...
qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch), sequence: 770, resource id: 136314920, major code: 130 (Unknown), minor code: 3
qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch), sequence: 935, resource id: 136314920, major code: 130 (Unknown), minor code: 3
qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch), sequence: 1010, resource id: 136314920, major code: 130 (Unknown), minor code: 3
qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch), sequence: 1059, resource id: 136314920, major code: 130 (Unknown), minor code: 3
qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch), sequence: 1070, resource id: 136314920, major code: 130 (Unknown), minor code: 3
qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch), sequence: 1211, resource id: 136314982, major code: 130 (Unknown), minor code: 3
qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch), sequence: 1349, resource id: 136314996, major code: 130 (Unknown), minor code: 3
qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch), sequence: 1583, resource id: 136315025, major code: 130 (Unknown), minor code: 3
qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch), sequence: 1790, resource id: 136315025, major code: 130 (Unknown), minor code: 3
qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch), sequence: 1839, resource id: 136315025, major code: 130 (Unknown), minor code: 3
qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch), sequence: 1850, resource id: 136315025, major code: 130 (Unknown), minor code: 3
qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch), sequence: 1978, resource id: 136315074, major code: 130 (Unknown), minor code: 3
qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch), sequence: 2112, resource id: 136315088, major code: 130 (Unknown), minor code: 3
qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch), sequence: 2343, resource id: 136315113, major code: 130 (Unknown), minor code: 3
qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch), sequence: 2538, resource id: 136315113, major code: 130 (Unknown), minor code: 3
qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch), sequence: 2587, resource id: 136315113, major code: 130 (Unknown), minor code: 3
qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch), sequence: 2598, resource id: 136315113, major code: 130 (Unknown), minor code: 3
qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch), sequence: 2744, resource id: 136315164, major code: 130 (Unknown), minor code: 3
qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch), sequence: 2878, resource id: 136315178, major code: 130 (Unknown), minor code: 3

原因

QT找不到xcb动态库,

没有将libqxcb库拷贝到发布包中,或者libqxcb需要的动态库不全

 

解决办法

将Qt安装目录中 Qt5.6.3/5.6.3/gcc_64/plugins/platforms 拷贝到qt程序所在目录, 
使用ldd查看libqxcb需要链接的库是否能找到,如果没有,将缺少的库一并拷贝到发布包中

以上是关于Qt报错:qt.qpa.xcb: QXcbConnection: XCB error: 8 (BadMatch).....的主要内容,如果未能解决你的问题,请参考以下文章

QT 运行报错

Qt在运行代码时,构建报错,将所有路径改成中文后,同样报错,求解答?

Qt整合 SDL2报错

编译玩qt交叉编译环境,进行qt程序开发时make总是报错

qt 调用 opencv 报错没有引用库

Ubuntu 22.04 解决 使用 Qt报错:qt.qpa.plugin: Could not load the Qt platform plugin “xcb“ in ““ even...