I have hundreds of files that I want to deploy with my application. For several reasons I'd like to put all of them into one file and then access them using QUrl from QML. Basically I would like to use the Qt resource system, but I can't. It's too much data and my machine cannot handle the compilation.
So I thought about putting all those files into a ZIP-file (or similar). Now, I know how to access that data from C++, but I'm unsure what interface I have to implement to make the content available to QML. Is QIODevice the way to go? If yes, how can I get it to work with QUrl?
Currently my C++ backend has properties like:
@ Q_PROPERTY(QUrl image READ getImage NOTIFY imageChanged); @
And in QML I'm doing:
I hope to be able to keep all that code and transparently access the ZIP file instead of the resource file. If that does not work it would also be ok for me to change the URLs to something like zip:///somedir/image.jpg
It would be great if you could give me some pointers in the right direction. Especially the QUrl/QML integration.