打开exe运行程序是,弹窗提示:

Application failed to start because it could not find or load the QT platform plugin “windows”

其实可以比较容易定位是缺少Qt的dll库文件导致的。这通常由于发布了程序之后,运行的计算机里没有将Qt的库添加到默认的环境变量或者程序设定的搜索路径,也可能是运行平台并没有Qt的库。

网上提示的不少解决方法是,将Qt目录下的dll文件复制到exe同目录下。

这里也引用一下这个解决方法:

将Qt5.6.2\5.6\msvc2013\plugins\中的platforms和imageformats这两个文件夹复制到exe同级目录下

实际上,如果你用了别人的程序,同时还不知道源码的状态下,通常很难知道依赖了哪些库。尤其是当使用了较多Qt功能时,这样可能会十分的麻烦。

网上还有一种方法,使用VC自带的depends分析依赖库,然后手动将dll拷贝到目录下

有效的解决方法:

Qt其实自带一个依赖包分析程序,这个程序可以帮助你定位你发布的程序所以来的Qt的库资源,自动将缺少的库拷贝到程序所在的目录。

这个Qt工具 windeployqt 位于Qt目录下的msvc\bin文件夹下。

请使用cmd命令行,在你有此问题的程序文件夹下,执行命令

c:\Qt\Qt5.2.1\5.2.1\msvc2010_opengl\bin\windeployqt.exe application.exe
这里假设application.exe是你的程序。
此时,windeployqt会自动拷贝需要的Qt库到application的目录。

结束之后,请再尝试运行程序,Qt库将不再报错。

PS:引用自stackoverflow

https://stackoverflow.com/questions/21268558/application-failed-to-start-because-it-could-not-find-or-load-the-qt-platform-pl
--------------------- 
作者:转载自EthanXZhang 
来源:CSDN 
原文:https://blog.csdn.net/fan2273/article/details/78262952 
ps:在此不得不吐槽一下,csdn不支持转载是不是怕重复文章太多,那您倒是提供一个收藏文章功能啊

Qt程序运行提示“it could not find or load the QT platform plugin “windows””相关推荐

  1. Qt编译运行提示No rule to make target ‘xxx.h‘ needed by ‘xxx.o‘.Stop

    Qt编译运行提示No rule to make target 'xxx.h' needed by 'xxx.o'.Stop 今天使用Qt运行程序时突然报错No rule to make target ...

  2. Delphi 程序运行提示 “Database Login”对话框,让输入ADOConnection1 的UserName和Password...

    程序运行提示下图 解决方法: 1.ADOConnection1控件的LoginPrompt属性 设置为 False 转载于:https://www.cnblogs.com/lanzhizui/p/70 ...

  3. [转载]Qt platform plugin 'windows'

    Qt platform plugin 'windows' 原文链接:https://blog.csdn.net/darren2015zdc/article/details/73293698 关于Qt ...

  4. Python报错it could not find or load the Qt platform plugin windows

    在用python画图的时候,弹出来一个小框,说是"it could not find or load the Qt platform plugin "windows"&q ...

  5. pyside2出现qt.qpa.plugin: Could not find the Qt platform plugin windows in 错误解决办法

    系统平台:Win10 64bit python版本: python 3.5.3 pyside2版本:pyside2-5.11.0(使用pip install -U pyside2安装) pyside2 ...

  6. Qt-c++桌面编程报错:qt.qpa.plugin: Could not find the Qt platform plugin “windows“ in

    问题:Qt-c++桌面编程报错:qt.qpa.plugin: Could not find the Qt platform plugin "windows" in "&q ...

  7. 【已解决】报错qt.qpa.plugin: Could not load the Qt platform plugin “windows“ in “...“ even though it was

    问题描述: 在Python程序中使用到Pyside2进行图形界面搭建,并使用Pyinstaller将程序打包为独立可执行文件后,双击.exe文件,出现报错: "qt.qpa.plugin: ...

  8. 解决This application failed to start because it could not find or load the Qt platform plugin windows

    PyQt5+python做UI时,使用pyinstaller打包成exe,点击运行exe文件时,出现This application failed to start because it could ...

  9. qt程序运行,有时候出现内存错误

    第一次提示:*** glibc detected *** ./Jammer: free(): invalid pointer: 0x00041340 *** 第二次提示:*** glibc detec ...

最新文章

  1. 华为机考HJ2计算字符个数
  2. (chap1 web网络基础) HTTP协议相关的各个协议(2)
  3. QFileDialog::getOpenFileName
  4. Boost:不受约束的bimap双图的测试程序
  5. Windows Azure 真实案例:CCH 财政服务独立软件开发商(ISV)通过托管服务获得了灵活性并节省成本...
  6. 没有写入hosts文件权限
  7. java 1000到9999_java – 可以0.99999999999乘以四舍五入到1.0?
  8. python cv2 轮廓的包络 面积_Python + Opencv2 实现轮廓提取,轮廓区域面积计算
  9. php soap 用法,php soap用法
  10. 基于51单片机的指纹考勤器
  11. 【行空板教程】手写输入法
  12. 7 年 Python 的我,总结了这 90 条写 Python 程序的建议
  13. 2022年可能会继续的一些品牌设计趋势
  14. LaText Error:Environment aligned undefined.
  15. 向量代数,直线,平面
  16. HTML5期末大作业:影评网站的设计--豆瓣以及IMDb等影评网站
  17. Word文件怎么打印
  18. 正三角形c语言编程,三角形 (C语言代码)
  19. 基于AGS JS开发自定义贴图图层
  20. 【日常学习】XML文件约束,Tomcat服务器和HTTP协议

热门文章

  1. 云端大数据实战记录-大数据推荐
  2. Tomcat 处理 HTTP 请求源码分析(上)【转】
  3. 婚姻里的潜规则:你的男人也嫌你穷【转】
  4. Istio:一个用于微服务间通信的服务网格开源项目
  5. 机器学习系列之手把手教你实现一个分类回归树
  6. fastjson读取json配置文件
  7. java.lang.Long cannot be cast to java.lang.Integer解决办法
  8. 使用Facebook方法处理复杂问题
  9. Java Review - 并发编程_PriorityBlockingQueue原理源码剖析
  10. 小工匠聊架构 - 缓存与数据库【双写不一致】【读写并发不一致】解决方案一览