Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Ressource - Setting a directory as a resource?
maximus last edited by
I would like to know if it's possible to bind a directory to a resource like you can with files.
For example, I have a bunch of xml inside a folder that I would like to deploy with my software.
Best thing for me would be to set the folder as the resource and then use Qt to iterate through the files inside the folder. I want to use resource because I would like to hide the files from the installation directory (what i'm doing now)
AFAIK, no, you have to select the complete content of the directory and add it to your qrc file
kuschky last edited by
Take look to QResource
if you place a directory with your xml files inside the Resource file you can query the Resource system for this directory and you will get the list of files it contains.
This List of filenames you can use to open it with QFile and an url similar this one:
qrc:/somedir/some.xml file descriptor