[Qt-interest] Embed pixmaps at runtime

Frank Hemer frank at hemer.org
Mon Feb 16 20:50:17 CET 2009


On Monday 16 February 2009 19:58:59 Constantin Makshin wrote:
> Thanks for the notice, Frank. I've never had a need to add something to
> the application's executable at runtime and thus hadn't looked for such
> feature in any of Qt tools. :)
>
> But, anyway, modifying executables may be a tricky process (you may need
> to go through the code and fix pointers) and OS may not allow you to do so
> (no permissions, treating executable of a running application as a
> read-only file, etc.).

QResource::registerResource (...) does not modify the executable - it loads 
the resource into memory. Same is done with the compiled-in resources. At 
runtime they're cached in memory.

Still its a pity qt doesn't provide a way to register resources at runtime 
without running them through rcc. This would ease access to default-contained 
(compiled-in) but user-modifyable resources a lot.

Frank



More information about the Qt-interest-old mailing list