How to bundle a folder with a Qt application?



  • I have a Qt application that accesses a folder in my E:/ drive through QDir class and I want to bundle that folder with the executable of the application like I do with resource files. But The folder have sub-folders so I don't want to add all the files in the folder and it's sub-folders to the resource file.

    Is there something I can write in the .pro file allows me to achieve this.

    • Note: The application is for android, so may be adding it to assets will help, but I don't know how to do it even.

    Thanks.



  • I don't think anything exist like this. You can generate myfiles.dat with contents of folder and all sub-folders by writing another program itself. You can use QDir to read the directory. You can include myfiles.dat as resource file. You need to read the contents of myfiles.data using QFile class.

    All this is making it as work-around.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.