Qt Setting Application Icon
Qt4 设置应用程序图标
- 将一个ico图标放在资源文件夹下;
- 然后建立txt,输入
IDI_ICON1 DISCARABLE “myico.ico”
; - 保存文件,将其后缀改为.rc;
- 然后,在项目目录pro的文件里加入
RC_FILE += myico.rc
;
直接运行程序,这样MainWindows窗口图标的左上角的图标和debug里面的可执行程序的图标就变了。我的天啊,这是要累死人的节奏.
2016_09_03更新
Qt5 Win 设置应用程序图标
- 将一个ico图标放在资源文件夹下,假设取名:myApp.ico
- pro的文件里加入
RC_ICONS = myiApp.ico
;
直接运行程序,这样MainWindows窗口图标的左上角的图标和debug里面的可执行程序的图标就变了。我的天啊,步骤少了一半儿啊.
2017_10_11 update
Qt5 Mac Setting Application Icon
Qt Help manual hot key Setting Application Icon
include win,mac,linux.
In Mac,
- Download ico file;
- Using Mac App tool
IconKit
to create all size icon files inapp.iconset
folder(you can rename it); - Using Mac command tool
iconutil -c icns app.iconset
to create app.icns file; - Adding
ICON = app.icns
topro
file; - Removing debug folder and to rebuilding project.
That is all.
附加问题描述
这是刚接触Qt的时候,遇到的一个小问题,如下:
同学编写的小程序里,建立了资源文件夹,并在里面加入了(ico,png图片)而且在MainWindows窗口属性的windowsIcon的属性里,设置了图片。本以为这样就可以设置debug里面的exe的应用程序的图标。但是,现实的情况是,程序里面的图标变了,但debug里面的没有变。
解决方法:
通过我们的多次尝试,这个问题算是初步解决了。
- 我们怀疑是设置冲突问题,也就是说资源文件和独自创建的ico冲突了。所以,我们把资源文件删除了.使用【】里面的方式设置,成功。
- 然后我们又把资源文件加上,而那个ico文件没有加入。重新构建,成功。
2018_03_24更新
How to set Qt Application Icon in Linux
you can to read below links and reference.
- Setting Application in linux, Qt Help manual keyword
Setting Application Icon
- Desktop Entry
- Icon theme
In my Ubuntu
we can to see how the QtCreater to set the application icon.
/home/joe/.local/share/applications/DigiaQt-qtcreator-community.desktop
/home/joe/.local/share/icons/hicolor
tree .
.
├── 128x128
│ └── apps
│ └── QtProject-qtcreator.png
├── 16x16
│ └── apps
│ └── QtProject-qtcreator.png
├── 24x24
│ └── apps
│ └── QtProject-qtcreator.png
├── 256x256
│ └── apps
│ └── QtProject-qtcreator.png
├── 32x32
│ └── apps
│ └── QtProject-qtcreator.png
├── 48x48
│ └── apps
│ └── QtProject-qtcreator.png
├── 512x512
│ └── apps
│ └── QtProject-qtcreator.png
└── 64x64
└── apps
└── QtProject-qtcreator.png
or
/usr/share/applications/ /** has many desktop file */
/usr/share/icons/hicolor /** has all app icons */
Qt Setting Application Icon的更多相关文章
- Manifest merger failed : Attribute application@icon value=(@mipmap/ic_launcher) from AndroidManifest
情况是这样子的,导入一个比较老的项目(两年前),它依赖于一个 Libraray,已经先导入了 library,现在导入项目的时候出了错 (1) Android Studio 目前提供将 SDK包成 . ...
- An application icon
The application icon is a small image which is usually displayed in the top left corner of the title ...
- Qt Widgets Application可执行程序发布方式
前言 写好的Qt程序想打包发布,之前按照Qt快速入门系列教程里的方法,直接选release,构建,之后找到exe,拷贝几个dll,然而报错如图: 后来找到教程:http://tieba.baidu.c ...
- iOS 点击Application icon加载推送通知Data
今天做APNS远程推送通知遇到了一个问题,就是手机接收到通知的时候,如果马上点击通知的 alert view时候,系统马上唤醒你的Application,通知或调用你的didReceiveLocalN ...
- 【iOS开发-71】解决方式:Attempting to badge the application icon but haven't received permission from the...
(1)原因 一切都是iOS8捣的鬼.您假设把模拟器换成iOS7.1或者更早的,就不会有这个问题.而如今在iOS8中要实现badge.alert和sound等都需要用户允许才干,由于这些都算做Notif ...
- Attempting to badge the application icon but haven't received permission from the user to badge the application错误解决办法
今天刚刚学习UIApplication对象,当我希望利用这个对象在我们的应用图标上显示个数字的时候,xcode报了这个错误: 解决办法 : - (IBAction)applicationClicke ...
- 更改Qt Application为 Qt Console Application
工程属性 -> 链接器 -> 系统 -> 子系统 : 更改为 控制台 (/SUBSYSTEM:CONSOLE)
- Qt Console Application
代码编译完生成的.o文件(又称对象文件,是可执行文件)和链接.o文件形成的.exe可执行文件都保存在“build-Project-Desktop_Qt_5_8_0_GCC_64bit-Debug”中. ...
- Create a Qt Widget Based Application—Windows
This turtorial describes how to use Qt Creator to create a small Qt application, Text Finder. It is ...
随机推荐
- bzoj 1070 [SCOI2007]修车——网络流(拆边)
题目:https://www.lydsy.com/JudgeOnline/problem.php?id=1070 后面还有几辆车在这个人这儿修,自己这辆车的时间对总时间的贡献就要多乘上几倍. 所以可以 ...
- 使用RawComparator加速Hadoop程序
使用RawComparator加速Hadoop程序 在前面两篇文章[1][2]中我们介绍了Hadoop序列化的相关知识,包括Writable接口与Writable对象以及如何编写定制的Writable ...
- OPCClient和OPCServer在Windows上运行方式的恩怨
http://www.diangon.com/wenku/PLC/201504/00021970.html 近段时间,遇到不少人都被OPCClient与OPCServer之间的通讯搞得头大,通过几次远 ...
- CArray,CList,CMap如何实例化
1.定义一个CMap,向这个CMap中增加数据项(键-值对).CMap<CString, LPCTSTR, CString, LPCTSTR>m_ItemMap;CString strKe ...
- CStdioFile的Writestring无法写入中文的问题
解决UNICODE字符集下CStdioFile的Writestring无法写入中文的问题 2009-12-01 23:11 以下代码文件以CStdioFile向无法向文本中写入中文(用notepad. ...
- Windows下安装HBase
本文转载自:http://blog.csdn.net/kangkanglou/article/details/30748139 本文主要参照Hbase官网:http://hbase.apache.or ...
- Oracle清理大表,降水位
背景:一张表的清理机制存在问题,导致该表的数据一直在增加,该表水位已很高,需要对该表的数据进行清理并降水位. 1.1 迁移前准备 步骤一.新建表 p_transaction_bak. oracle@l ...
- 【BZOJ】1441 Min(数学)
题目 传送门:QWQ 分析 裴蜀定理. 因为存在 $ a_1 $ $ a_2 $...... $ a_n $的最大公约数为 $ d $,那么必定存在 $ x_1*a_1+x_2*a_2+...x_n* ...
- CentOS 7 创建桌面快捷方式
一,在桌面新建一个文件 文件名随意,但必须带有.desktop的后缀名, 以Eclipse为例 vi /home/lenmom/Desktop/eclipse.desktop 其中: lenmom 是 ...
- javaweb地图定位demo
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/stri ...