This application failed to start because it could not find or load the Qt platform plugin "xcb".
Reinstalling the application may fix this problem.
这里问题折腾了好久!
这里的xcb指的是libqxcb.so这里文件没有找到。应该是路径问题。
在命令行界面,输入export QT_DEBUG_PLUGINS=1
./main
这样就可以看到插件的载入情况。
我的显示是在可执行文件夹下的platfroms目录去找libqxcb.so这个文件,没有找到。
解决办法:将Qt安装目录的platfroms文件下拷贝到可执行文件下。