程序运行时提This application failed to start because no Qt platform plugin could be initialized.


包含QT的程序,运行的时候可能会遇到This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.Reinstarlling...这个报错。

大致意思就是qt平台插件初始化失败了。如图:

解决办法:

qt5的库里包含的有个plugins文件夹,点开之后里面是bearer、iconengines、imageformats、platforms等等这些目录。如图:

找不到的建议直接everything工具搜索。找到之后将这个plugins直接复制到你的可执行程序目录下,如图:

再次运行程序,正常运行,不再报上述QT的错误。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM