解决编译QT时报错:
qt.qpa.plugin: Could not find the Qt platform plugin “windows” in “”
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
找了很久,终于找到解决办法啦!!!
参照下图,
链接:https://www.cnblogs.com/h2zZhou/p/10239836.html
具体操作
1.找到左侧菜单栏中的“项目”,
2.找到左侧最底的“构建环境”,进入“详情”。由于我已经操作过了,所以第二行显示设置环境变量到哪哪哪,这其实就是刚设置的环境变量。
3.点击“添加”,去新添加一个环境变量。变量名字如下图,不要变!!!
QT_PLUGIN_PATH。
后面的地址就是你安装的位置处mingw文件夹下的plugins文件夹,根据自己的位置按图操作吧。
设置完这个,再去debug或release就都可以啦!!!