如何将qrc资源文件复制到文件系统? [英] How to copy qrc resource file into filesystem?
本文介绍了如何将qrc资源文件复制到文件系统?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想知道如何将嵌入到qrc应用程序中的文件复制到fs中?像
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");
似乎无法工作。
推荐答案
您不需要 qrc
,资源以开头:
例如 QFile myFile data / data.xml);
ps我不知道QFile如何处理资源文件名的大小写敏感性为了更好的可移植性可能需要确保该案例匹配您的qrc文件中的任何内容。
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.
这篇关于如何将qrc资源文件复制到文件系统?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文