How to copy qrc resource file into filesystem?

c++, qt

Solution

You don't need the `qrc`, resources start with a `:`

eg `QFile myFile(":/data/data.xml");`

PS: I'm not sure how QFile treats case sensitiveness on resource filenames. For best portability you might want to make sure the case matches whatever is in your `qrc` file.

Problem

I wonder how to copy file that is embeded into app qrc into fs? Stuff like ``` QFile::copy("qrc:/assets/files/my.file" , "C:/my.file"); ``` seems not to work. Why and how to make it to?

Original source