I'm having difficulty figuring out how to access a Qt Resource File from a function that is not from Qt.
I've read the problem posted at How to access Qt resource data from non-Qt functions but the answer given just gave a workaround on how to include the file in the same directory as the executable, which is not what I want to do. I want to ensure that the file exists and can't be tampered with when my program runs (which is why I want to use the qrc route).
To give you some background: I'm using this in a program that uses OpenCV's Machine Learning Libraries where I need to load a training file. The loading processing takes one argument, a path to an .xml file.
At the moment the only solution I can come up with is every time I load the file I open the qrc file using QFile, then output this file temporarily in the directory with my executable, then load this file using my OpenCV load function, then delete the temporary file from my directory.
This would be a pretty messing workaround that I'd like to avoid. Any solutions to my problem would be greatly appreciated.