11-01-2012 03:15 PM
I would like to put my qml files into a Qt resource file. This is something I have done with Qt desktop. However I am having difficultiy as it never resolves the path at run time. I have something like this:
QmLDocument *qml = QmlDocument::create("qrc:/assets/main.qml");
I have trid putting the string into a Qurl but that did not help.
I have a resource file named asssets.qrc that looks like this:
<!DOCTYPE RCC><RCC version="1.0">
I then compile it with rcc assets.qrc -o assets.cpp. I then add it to my project and see that does compile. but the run time error says it cannot resolve the url.
Can qml files be put into resources, if so what is the correct way to do it.
07-03-2013 01:56 AM
this can help you
Mark the answer as sloved if my answer helped you...