My application needs some files to executed properly. The files are needed for initialization of an embedded interpreter and the library functions only support passing a filename, not an open file descriptor.

I can have the files live in a known directory, but they could get accidently deleted by accident. I'm wondering if there's a good way to create the files from Qt resources?

I can have a trivial Qt method that copies the files at startup from their resource definitions into temporary files and use the copies.

Is there a better way?