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?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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
qrcfile.