Qt Creator9.0.1中开始QML编程时遇到:Could not find the Qt platform plugin “xcb“ in ““的问题解决


16:21:46: Starting /home/username/build-MyQMLTest-unknown-Debug/MyQMLTest...
QML debugging is enabled. Only use this in a safe environment.
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.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc.

16:21:46: /home/username/build-MyQMLTest-unknown-Debug/MyQMLTest 崩溃。

在使用Qt的Qml创建项目进行运行时,问题出现了。

解决方法一:缺什么就补什么,大概率是缺库问题

在一个帖子的介绍中说添加

libxcb1_1.14-3ubuntu3_amd64.deb
libxcb-util1_0.4.0-0ubuntu3_amd64.deb
libxcb-xinerama0_1.14-2_amd64.deb

https://pkgs.org/search/?q=libxcb下载后,然后sudo dpkg -i XXX,但是问题仍然没有解决。

QtCreator从9.0.1改为Q

猜你喜欢

转载自blog.csdn.net/weixin_49369227/article/details/129860403