解决 Qt5 报错 This application failed to start because it could not find or load the Qt platform plugin

QT为了简化生成发布版本,特别提供了工具 "windeplayqt.exe",这个工具在 "...\Qt\msvc2017_64\bin"的目录下,通过该命令,可以解决上述错误。

打开控制台窗口

设置搜索路径以便系统可以搜索到 "windeployqt.exe"

运行 "windeplayqt.exe D:\work\project\sample\bin\Release\sample.exe", 所需要的QT运行库就自动拷贝到目标程序目录了。

其他

以上方法也适合debug版本。

如果程序使用了新的QT模块,重新执行一遍即可。

解决 Qt5 报错 This application failed to start because it could not find or load the Qt platform plugin

相关文章:

  • 2021-05-11
  • 2021-10-24
  • 2021-09-26
  • 2021-07-21
  • 2022-12-23
  • 2022-12-23
  • 2021-08-22
猜你喜欢
  • 2021-06-28
  • 2021-04-04
  • 2021-04-22
  • 2021-07-30
  • 2021-07-12
相关资源
相似解决方案