您的位置: 首页 > 文章 > Qt 运行时报错 This application failed to start because no Qt platform plugin could be initialized! Qt 运行时报错 This application failed to start because no Qt platform plugin could be initialized! 分类: 文章 • 2024-01-04 22:19:55 问题 运行时报错: This application failed to start because no Qt platform plugin could be initialized! 如图: 描述: 代码没有问题,我换成其他构件就正常了。如 5.12.7 解决方案: 环境变量中加入:QT_PLUGIN_PATH QT_PLUGIN_PATH=D:\Qt\Qt_SDK\5.12.6\msvc2017\plugins 我的方式是在Qt Creator 里面添加 即:项目 -> 编译(build) -> 环境变量-> 添加 (如图)