This application failed to start because no Qt platform plugin could be initialized
Posted Linz Who
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了This application failed to start because no Qt platform plugin could be initialized相关的知识,希望对你有一定的参考价值。
今天在直接运行QT生成的.exe遇到了一个错误:This application failed to start because no Qt platform plugin could be initialized,Reinstall the application may fix the problem:
大致上是因为依赖库的缺失或错误,记住用到什么库就放什么,有时候一些多余的库也会导致这个问题
方法一: 查看工程的依赖库,比对着去添加需要的库到debug/release目录下
方法二:使用Qt部署工具windeployqt.exe(在qt安装目录中)来检测运行该exe所需动态库,运行命令:
windeployqt.exe 目标.exe
运行完成后,目标.exe同级目录中就会出现其依赖库了,相关的plugins和platform文件夹与动态库都会拷贝在该目录下。
以上是关于This application failed to start because no Qt platform plugin could be initialized的主要内容,如果未能解决你的问题,请参考以下文章
This application failed to start because no Qt platform plugin could be initialized
This application failed to start because no Qt platform plugin could be initialized.
This application failed to start because no Qt platform plugin could be initialized
使用 pyinstaller 将 python 文件转换为 .exe 给出: This application failed to start because no Qt platform plugi
This application failed to start because no Qt platform plugin could be initialized报错
pyqt5-tools 使用qtdesigner错误-This application failed to start because no Qt platform plugin could be i