QT应用程序不能在Windows资源管理器上工作? [英] QT Application doesn't work on Windows explorer?

查看:490
本文介绍了QT应用程序不能在Windows资源管理器上工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Windows资源管理器上执行QT应用程式。我刚刚下载它,所以我仍然是新的QT当我通过QT的创建者运行应用程序它工作正常,但当我在Windows Explorer上执行它
(\QT \testingGUI-build-desktop-Qt_4_8_0__4_8_0__Release\发布< -in此文件夹)
它不工作,没有错误,没有消息没有。

How do I execute the QT application on Windows explorer. I just downloaded it so I am still new to QT when I run the application through the QT creator it works fine but when I execute it on windows explorer (\QT\testingGUI-build-desktop-Qt_4_8_0__4_8_0__Release\release <-in this folder) it doesn't work ,no error, no message nothing.

好的,我想出了如何解决这个问题。

okay I figured out how to solve this.

回答

如果任何人遇到此问题,请按照以下步骤操作,你的问题,如果它是相关缺少库。

If anyone got this issue follow these steps ,you can solve your issue if it's related missing libraries.

发布称为部署的应用程序。虽然您可以通过QT创建者运行您的应用程序,如果相关库(.dll)文件不驻留在您的应用程序(.exe)的文件夹中,可能无法在Windows资源管理器(或QT创建者外部)所以你需要做的是将那些相关库(.dll)文件复制并粘贴到您的应用程序的文件夹中,但是如何找出需要什么库文件?以了解与应用程序链接的库文件

the process of releasing an application known as deploying. though you can run your application through the QT creator it may not possible to run it on windows explorer (or outside of QT creator) if the relevant library(.dll) files are not resided inside the folder where your application in(.exe) so all you have to do is copy and paste those relevant library(.dll) files to the folder where your application in. but how do you figure out what library files are needed? to find out what library files are linked with the application

http: //www.dependencywalker.com/

使用此软件,运行您的应用程序,并找出是否有任何错误消息(它指示为黄色/红色)缺少的库文件显示在第二个窗口(底部)
可能有很多,但不是所有的库文件都需要因为我认为它足够复制 - >粘贴主库。

use this software, run your application and find out is there any error message( it indicates in yellow /red colour) the missing library files are shown in the second window (bottom) there might be many but not all library files are needed cause I suppose it's enough to copy -> paste the main library.

然后转到QT库仓库
Qt \4.8.0\bin(如果您不记得确切的位置,请在Windows资源管理器中搜索)
这是所有库文件由QT存储的地方。复制所有相关的库文件,并粘贴到您的应用程序所在的目录。请确保您不复制粘贴调试所需的库文件。

then go to the QT library repository Qt\4.8.0\bin (search on windows explorer if you don't remember the exact place) this is where all library files are stored by the QT. copy all relevant library files and paste to the directory where your application in. that's all. make sure you don't copy paste the library files in which are needed for debugging.


现在的例子QtGui4.dll - >释放.dll(这个比较小)
QtGui * d * 4.d​​ll - > debug .dll(这是比较大的所以不要使用
这个库文件来部署你的应用程序)

now example QtGui4.dll - > releasing .dll (this is relatively small) QtGui*d*4.dll -> debugging .dll (this is relatively big so don't use this library file for deploying your application)

不要忘记d因为它表明库文件在调试阶段使用。
,所以你不需要使用它已经发布的应用程序。

don't forget the d cause it indicates that library file is used in debugging stage. so you don't need to use it for application which was already released.

推荐答案

Qt DLL可能不在您的PATH中。您还可以简单地将所需的Qt DLL复制到您的发行目录中。

The Qt DLLs are probably not in your PATH. You may also simply copy the required Qt DLLs to your release directory.

这篇关于QT应用程序不能在Windows资源管理器上工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆