QT报错:This application failed to start because no Qt platform plugin could be initialized.

07-21 1090阅读

报错信息 “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.

1.最常见的情况就是缺少platforms

确保 platforms 目录存在,并且包含 qwindows.dll 文件。你的文件结构应该类似于

your_app_directory/
├── platforms/
│   └── qwindows.dll
├── app.exe
├── other_required_files.dll

2.确保文件结构正确还有报错的话,请添加Qt的系统环境变量

(1)首先找到你Qt的安装路径下dll库的路径,以我的电脑为例:

QT报错:This application failed to start because no Qt platform plugin could be initialized.

D:\Qt\Qt5.13.0\5.13.0\mingw73_64\bin

(2).此电脑右键属性,打开设置界面

QT报错:This application failed to start because no Qt platform plugin could be initialized.

(3).点击高级系统设置

QT报错:This application failed to start because no Qt platform plugin could be initialized.(4).在弹出的系统属性界面点击环境变量

QT报错:This application failed to start because no Qt platform plugin could be initialized.

(5).在弹出的环境变量界面找到Path,选中编辑

QT报错:This application failed to start because no Qt platform plugin could be initialized.

(6).点击新建,将步骤(1)的路径复制进去,点击确定。

QT报错:This application failed to start because no Qt platform plugin could be initialized.

如果你按照以上步骤操作,仍然遇到问题,请尝试在没有 Qt 安装的干净环境中运行应用程序,或者评论留言所遇到的问题。

VPS购买请点击我

文章版权声明:除非注明,否则均为主机测评原创文章,转载或复制请以超链接形式并注明出处。

目录[+]