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

QT为了简化生成发布版本,特别提供了工具 "windeplayqt.exe",这个工具在 "...\Qt5.8.0\5.8\msvc2015_64\bin"的目录下,经过该命令,能够解决上述错误。工具

  1. 打开控制台窗口
  2. 设置搜索路径以便系统能够搜索到 "windeployqt.exe"
  3. 运行 "windeplayqt.exe D:\work\project\sample\bin\Release\sample.exe", 所须要的QT运行库就自动拷贝到目标程序目录了。
  • 其余
  1. 以上方法也适合debug版本。
  2. 若是程序使用了新的QT模块,从新执行一遍便可
相关文章
相关标签/搜索