• 7189阅读
  • 10回复

qt编辑desktop文件问题 [复制链接]

上一主题 下一主题
离线chinafei
 
只看楼主 倒序阅读 楼主  发表于: 2008-08-28
— 本帖被 XChinux 执行加亮操作(2008-09-10) —
各位老师,我在qt下编译形成了一个可执行文件,但是在QT界面上看到的可执行文件就是QT下可执行文件图标形式,我想编辑一个desktop桌面图标来把这个应用程序的功能大体上能体现出来,
该怎么形成desktop,比如说我这个可执行文件是执行拍照命令,我想把这个可执行文件图标变成一个
照相机的样子,该怎么做啊,请各位老师指点.
离线chinafei
只看该作者 1楼 发表于: 2008-08-28
        我刚刚接触qt编程,请各位老师多多指点,如果想把qtopia下的图标重新排列一下,该修改什么地方的源码啊,
我自己查看源码修改,请教一下源码位置就行。
离线chinafei
只看该作者 2楼 发表于: 2008-08-28
等待各位老师,兄弟,姐妹来指点一下
离线chinafei
只看该作者 3楼 发表于: 2008-08-29
      等待各位老师,前辈的指点
离线mumutouv

只看该作者 4楼 发表于: 2008-09-01
自己仿照着写啊,给你个例子
language那一块太多,我给省略了

[Desktop Entry]
Encoding=UTF-8
Type=Application
Exec=konsole
Icon=konsole
DocPath=konsole/index.html
Terminal=false
X-KDE-StartupNotify=true

Name=Konsole
。。。。。。
离线chinafei
只看该作者 5楼 发表于: 2008-09-05
        感谢侠客mumutouv的回复
离线chinafei
只看该作者 6楼 发表于: 2008-09-05
    我还是刚刚接触qt开发,您说的不太懂,哪位大大能不能在告诉详细点呢?告诉下什么地方有资料可以阅读也好啊!
这里谢谢了
离线chinafei
只看该作者 7楼 发表于: 2008-09-05
十分抱歉刚刚回复,这些天一直在学基础,只想最快的实现目标,其余的可以慢慢说,一直在想法怎么把c程序放在已经编译好的qtopia系统界面中,并且做个desktop可以表达一
下,可惜网络上这个资料很少啊,还要这里麻烦各位大大,路过的帮帮忙
离线codespy
只看该作者 8楼 发表于: 2008-09-05
在IDE下添加应用程序图标文件:Setting the Application Icon on Windows
First, create an ICO format bitmap file that contains the icon image. This can be done with e.g. Microsoft Visual C++: Select File|New, then select the File tab in the dialog that appears, and choose Icon. (Note that you do not need to load your application into Visual C++; here we are only using the icon editor.)
Store the ICO file in your application's source code directory, for example, with the name myappico.ico. Then, create a text file called, say, myapp.rc in which you put a single line of text:
        IDI_ICON1              ICON    DISCARDABLE    "myappico.ico"
Finally, assuming you are using qmake to generate your makefiles, add this line to your myapp.pro file:
        RC_FILE = myapp.rc
Regenerate your makefile and your application. The .exe file will now be represented with your icon in Explorer.
If you do not use qmake, the necessary steps are: first, run the rc program on the .rc file, then link your application with the resulting .res file.
在VC下RC_FILE = myapp.rc这步操作可以省略。再将这个rc文件加入到VC++的项目中,然后设置它的<配置属性|资源|常规|预处理器定义>为如下:
“_WINDOWS, UNICODE, WIN32, QT_LARGEFILE_SUPPORT, QT_DLL, QT_WEBKIT_LIB, QT_XML_LIB,
QT_GUI_LIB, QT_NETWORK_LIB, QT_CORE_LIB, QT_THREAD_SUPPORT, _DEBUG”
然后编译这个*.rc文件
离线chinafei
只看该作者 9楼 发表于: 2008-09-05
        十分感谢,虽然我英文不太好,但是一定啃下来!
离线chinafei
只看该作者 10楼 发表于: 2008-09-05
          啃完了,虽然不是很明白,但是给我了我一个方向,谢谢,如果在linux下该怎么做呢?
能不能在指点一下啊
快速回复
限100 字节
 
上一个 下一个