Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Is it possible to write to a qrc file dynamically?
I've tried to open a qrc file for writing but it didn't work.
Is there another way to do it?
no you can not.
qrc file is really only a xml based text file that is used to create binary data of your listed files/filetree to either pack into your executable or an external binary resource.
That is generated during compilation. Therefore "readonly"
To add to @J-Hilk, do you mean write to one of the file provided by your .qrc file from within your application ?
Pablo J. Rogina last edited by
@Hasan-Al-Baghdadi if your issue is solved (or at least isn't going to be the way you expected) please don't forget to mark the post as solved.
@Pablo-J.-Rogina my bad
What was the use case ?
I mean, what did you want to write back to rc ?
There is an input file that has to be read. It's assumed you're most likley to used the one you last used, so a copy is saved in the qrc, or atleast that was the plan.
In that case you should have a default file that you have in your .qrc file and then use QStandardPaths to store it in and use it from a sensible place.