Qt/C++:在 Windows 操作系统下运行程序时不显示图标 [英] Qt/C++: Icons not showing up when program is run under windows O.S

查看:53
本文介绍了Qt/C++:在 Windows 操作系统下运行程序时不显示图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是 QT 4.7.0.我在 Windows 中创建了一个项目.我在按钮上使用了一些图标,但是当我将 .exe 文件移动到另一台 Windows 机器时,图标不显示.如果我在开发机器上运行程序,就会出现图标.

I am using QT 4.7.0. I have created a project in Windows. I am using some icons on buttons, but when I move the .exe file to another Windows machine the icons don't show. If I run the program in the on the development machine, the icons appear.

我创建了一个 qrc 文件并在其中添加了图标.

I created a qrc file and added the icons to it.

推荐答案

您可能遇到了插件问题.QT 自带很多插件,您的应用程序在新目标上找不到它们.

Probably you are having a plugin issue. QT comes with many plugins and your application can not find them on new target.

查看这个链接.将插件复制到新目标并使用 qt.conf 方法指示插件路径.

Check out this this link. Copy the plugins to new target and use qt.conf method to indicate plugin paths.

这篇关于Qt/C++:在 Windows 操作系统下运行程序时不显示图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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