What exactly would you like to do? Keep the images in the filesystem and only build using resources when you have finished developing your application? If so then a simple solution would be to do it like this:
#ifdef WITH_RESOURCES
#else
static QString pixmapPrefix
="/complete/path/to/your/images/directory";
#endif
#ifdef WITH_RESOURCES
static QString pixmapPrefix=":";
#else
static QString pixmapPrefix="/complete/path/to/your/images/directory";
#endif
To copy to clipboard, switch view to plain text mode
All you need to do then is to use pixmapPrefix to refer to the images.
QPixmap px
(pixmapPrefix
+"/images/myimage.png");
QPixmap px(pixmapPrefix+"/images/myimage.png");
To copy to clipboard, switch view to plain text mode
If you export this variable to scripts, you can use the same trick there.
A more elegant but requiring more work solution is to register your own prefix with QAbstractFileEngine that will either use resources or real files.
Bookmarks