QT This application failed to start because it could not find or load the Qt platform plugin "window

编译环境

win10 + vs2013 + qt5.8

运行环境

普通 windows 系统,无 vs2013 和 qt5.8环境。

问题描述与解决

在编译环境下可正常运行程序,随后将项目的 Release 目录拷贝到另一台电脑上运行,就会出现错误“This application failed to start because it could not find or load the Qt platform plugin "window”

QT This application failed to start because it could not find or load the Qt platform plugin "window

这是因为缺少了运行所依赖的 DLL 文件,在 Qt 的安装目录下,找到 plugins 目录,将 plugins 目录下的 platforms 文件夹拷贝到 Release运行目录下,也就是 exe 执行文件的目录下, 此问题就可以解决了。