Friday, July 31, 2009

The Qt Resource System

Go to http://doc.trolltech.com/4.5/resources.html

to produce a binary rcc file, use the following command:

rcc -binary myresrouce.qrc -o myresrouce.rcc

Tuesday, July 28, 2009

how to compile resource file in Qt

A resource file tells the location of the images defined in the ui file. It needs to be compiled in order for the code to use. Hopefully, in the resource file, the alias are defined, so that the relative path is used for each image, and therefore good for the portability.

To compile the resource file (resource.qrc) under the visual c++ environment, make sure the compiler knows the path of Qt.

Go to the bin path under Qt, for instance, cd C:\Qt\bin
type "rcc path\resource.qrc -o path\resource.rcc"

This will create rcc file which is recognized by the compiler.

Monday, July 6, 2009

魔法城堡

这是一首喜欢了十几年的歌.一开始是听一个童声唱的.前几天听到东方神超将这首歌唱到近乎完美.分享一下:

http://www.youtube.com/watch?v=1gGFfq63w6w

中文翻译如下:

是否你会相信
有个美丽传说
那遥远地方是神秘王国
你就是王子
快乐地生活
而我却中了魔
在沉睡着
是注定的爱情
就算前方很艰辛
不能抹去在你心中的决心
相信你可以把我唤醒
祈祷上天给你智慧和勇气
穿过充满神秘魔法的城堡
越过那些让人难以发觉的泥沼
在那黑暗的洞穴一直寻找
一定能遇到睡梦中我熟悉的微笑
牵起双手
一起飞翔
飞到天空任意地去遨游
不要害怕
就让我们一起
眼前这个世界会更美丽