此应用程序无法启动,因为无法找到或加载Qt平台插件“ Windows”错误消息

狮王

我以创建的应用程序Qt v5.3.1使用MinGW v4.8.2windows 7 32bit
打开我的应用程序时出现以下错误:

我已经包含了所有重要文件,以使用windeployqt.exe工具来运行我的应用程序

platforms文件夹还包含:

另外,我包含了所有重要文件,无需使用windeployqt.exe工具即可手动运行我的应用程序,但问题仍然存在。

我不知道如何解决这个问题。


编辑

使用Dependency Walker工具的结果

I'm still don't know how to get these dll files question mark.

Lion King

Firstly, thank everyone for contributing to the understanding of the problem and how to solve it.

Now, to solve this problem you must read this article Accurately, in order to understand first what is the problem, and then how to solve it. [Deploying a real Qt app – understanding more of Qt]

The conclusion In short :
the reason of the problem is the path of the plugins that you used in your project.
The default path to plugins that you used in your project is qt path folder, but when qt development environment not be installed on your machine, your application will not run, because the default path to plugins directed to qt path folder, and this is the problem.
We need to direct/change the plugins path to your application folder.

There are several ways to direct/change the path. I will mention the way in which I have already tried and succeeded in solving the problem

There is a static method named addLibraryPath(const QString & path), this method We will use it to direct/change the plugins path.

Example:

int main(int argc, char *argv[])
{
    QApplication::addLibraryPath("pluginsFolder");
    QApplication a(argc, argv);
    Widget w;
    w.show();


    return a.exec();
}

pluginsFolder is the folder that contain all plugins that you used in your project.

You can also change

QApplication::addLibraryPath("pluginsFolder");

To

QApplication::addLibraryPath(".");

This means that the plugins in the main application folder not in subdirectory named plugins.
And don't forget to use windeployqt.exe tool to deploy your project.

And finally, I hope that this the short explanation will be useful for those after me, who will face the same problem.

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

应用程序无法启动,因为无法找到或加载QT平台插件“ Windows”

来自分类Dev

应用程序无法启动,因为缺少平台插件“ Windows”

来自分类Dev

此应用程序无法启动,因为它无法在“”中找到或加载 Qt 平台插件“xcb”

来自分类Dev

此应用程序无法启动,因为无法初始化Qt平台插件

来自分类Dev

无法加载Qt平台插件Windows

来自分类Dev

导入错误:DLL 加载失败:应用程序无法启动,因为其并行配置不正确

来自分类Dev

Qt Windows部署:应用程序无法启动

来自分类常见问题

在未安装qt的Linux上启动qt5应用程序时,“无法加载平台插件“ xcb”“

来自分类Dev

我无法使用Kotlin中的Twilio API发送消息,因为错误显示并导致我的应用程序崩溃

来自分类Dev

Windows 中的 Bash 用法:“无法发送空消息”错误

来自分类Dev

Windows 8.1无法从cmd或Powershell提示符启动Powershell-“此应用程序无法在您的PC上运行”

来自分类Dev

无法创建JHipster应用程序(ng插件错误)

来自分类Dev

Qt5Core.dll在应用程序目录中时,QT 5.2应用程序无法启动(错误分配错误)

来自分类Dev

如何在Windows服务中显示启动错误消息?

来自分类Dev

无法在角度应用程序中找到“函数 scss 错误”

来自分类Dev

SpringBoard无法启动应用程序,错误为:-3

来自分类Dev

无法启动我的Android应用程序。“关闭VM”错误

来自分类Dev

springboot应用程序无法启动-错误(停止osbcejJettyEmbeddedWebAppContext)

来自分类Dev

SpringBoard无法启动应用程序,错误为:-3

来自分类Dev

无法运行 Node.js 应用程序,因为:“无法在视图目录中查找视图“错误””

来自分类Dev

Qt 5.1应用程序在QtCreator以外的Windows 8上无法运行,运行时错误

来自分类Dev

Windows Puma由于反向移植错误的文件描述符而无法加载应用程序

来自分类Dev

我在电子应用程序中无法加载错误

来自分类Dev

烧瓶错误:无法加载芹菜应用程序

来自分类Dev

SQLCLR似乎无法启动Windows应用程序

来自分类Dev

Windows 10应用程序将无法启动

来自分类Dev

Windows Phone 8.1应用程序中的routeResult.Status不断提供无效凭据错误消息

来自分类Dev

Windows桌面Cordova应用程序崩溃崩溃,没有错误消息

来自分类Dev

Chrome无法在Windows 8中启动,并显示错误消息“未注册课程”

Related 相关文章

  1. 1

    应用程序无法启动,因为无法找到或加载QT平台插件“ Windows”

  2. 2

    应用程序无法启动,因为缺少平台插件“ Windows”

  3. 3

    此应用程序无法启动,因为它无法在“”中找到或加载 Qt 平台插件“xcb”

  4. 4

    此应用程序无法启动,因为无法初始化Qt平台插件

  5. 5

    无法加载Qt平台插件Windows

  6. 6

    导入错误:DLL 加载失败:应用程序无法启动,因为其并行配置不正确

  7. 7

    Qt Windows部署:应用程序无法启动

  8. 8

    在未安装qt的Linux上启动qt5应用程序时,“无法加载平台插件“ xcb”“

  9. 9

    我无法使用Kotlin中的Twilio API发送消息,因为错误显示并导致我的应用程序崩溃

  10. 10

    Windows 中的 Bash 用法:“无法发送空消息”错误

  11. 11

    Windows 8.1无法从cmd或Powershell提示符启动Powershell-“此应用程序无法在您的PC上运行”

  12. 12

    无法创建JHipster应用程序(ng插件错误)

  13. 13

    Qt5Core.dll在应用程序目录中时,QT 5.2应用程序无法启动(错误分配错误)

  14. 14

    如何在Windows服务中显示启动错误消息?

  15. 15

    无法在角度应用程序中找到“函数 scss 错误”

  16. 16

    SpringBoard无法启动应用程序,错误为:-3

  17. 17

    无法启动我的Android应用程序。“关闭VM”错误

  18. 18

    springboot应用程序无法启动-错误(停止osbcejJettyEmbeddedWebAppContext)

  19. 19

    SpringBoard无法启动应用程序,错误为:-3

  20. 20

    无法运行 Node.js 应用程序,因为:“无法在视图目录中查找视图“错误””

  21. 21

    Qt 5.1应用程序在QtCreator以外的Windows 8上无法运行,运行时错误

  22. 22

    Windows Puma由于反向移植错误的文件描述符而无法加载应用程序

  23. 23

    我在电子应用程序中无法加载错误

  24. 24

    烧瓶错误:无法加载芹菜应用程序

  25. 25

    SQLCLR似乎无法启动Windows应用程序

  26. 26

    Windows 10应用程序将无法启动

  27. 27

    Windows Phone 8.1应用程序中的routeResult.Status不断提供无效凭据错误消息

  28. 28

    Windows桌面Cordova应用程序崩溃崩溃,没有错误消息

  29. 29

    Chrome无法在Windows 8中启动,并显示错误消息“未注册课程”

热门标签

归档