View Full Version : How to compile qt resource files?

10th August 2009, 04:46
In my project , I add a ".qrc" file.Here is its contents:

<qresource prefix="/iSchema" >
Before add this file, my ".exe" file is 100KB. After add, it's 204KB. And thoes two picures are 120KB. So as i see it, the qt resource is compiled into ".exe" files.

I don't liks this way.
1.The ".exe" file will be biger and biger if I add more and more picture.
2.If I change some picture ,I have to recompile the ".exe" file.

Could you tell my how to comile qt resouce files (such as picture and langure files) to a ".dll" file ? And in my ".cpp" file ,how to use it?

10th August 2009, 07:46
You can load them into a dll. What I think you would have to do is make a dll that provides you with functions that return a QPixmap based on what image you want to have. However, you will end up recompiling your dll instead of your application. To me there is no real advantage here unless you wish to use the exact same dll in a different application.