QT报错:This application failed to start because no Qt platform plugin could be initialized.(转)
报错信息 “this application failed to start because no Qt platform plugin could be initialized.Reinstalling the application may fix this problem” 通常是由于缺少必要的 Qt 平台插件。如果你按照以上步骤操作,仍然遇到问题,请尝试在没有 Qt 安装的干净环境中运行应
报错信息 “this application failed to start because no Qt platform plugin could be initialized.Reinstalling the application may fix this problem” 通常是由于缺少必要的 Qt 平台插件。
1.最常见的情况就是缺少platforms
确保 platforms 目录存在,并且包含 qwindows.dll 文件。你的文件结构应该类似于
your_app_directory/
├── platforms/
│ └── qwindows.dll
├── app.exe
├── other_required_files.dll
2.确保文件结构正确还有报错的话,请添加Qt的系统环境变量
(1)首先找到你Qt的安装路径下dll库的路径,以我的电脑为例:
D:\Qt\Qt5.13.0\5.13.0\mingw73_64\bin
(2).此电脑右键属性,打开设置界面
(3).点击高级系统设置
(4).在弹出的系统属性界面点击环境变量
(5).在弹出的环境变量界面找到Path,选中编辑
(6).点击新建,将步骤(1)的路径复制进去,点击确定。
如果你按照以上步骤操作,仍然遇到问题,请尝试在没有 Qt 安装的干净环境中运行应用程序,或者评论留言所遇到的问题。
————————————————
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/huanbailu/article/details/140318058
更多推荐
所有评论(0)