I'm writing an Ubuntu QML (phone) App with C++ plugins using ubuntu-sdk. My app includes a png image and in order to include the image in the binary (so it shows on the phone) I have created a qrc file.
My qrc file looks like this:
<!DOCTYPE RCC><RCC version="1.0"> <qresource> <file>../../../app/graphics/bigredbutton.png</file> </qresource> </RCC>
I've tried what QML app with C++ plugin (cmake) adding resource file suggests and got the Desktop version to work. However, when I run the app on my Aquaris E4.5 the image doesn't show up and I get the following error:
QML QQuickImage: Cannot open:
The image I want to show is stored in the /ProjectName/app/graphics directory. I'm including the qrc file within the backend directory, and added the lines the linked question indicates in the CMakeLists.txt within the backend directory:
set(CMAKE_AUTORCC ON) qt5_add_resources(RESOURCES modules/ProjectName/myres.qrc)
Where should the image/qrc files be stored, or what other configuration is necessary for packing the image in the binary and launching the app successfully on an Ubuntu Phone?
I'm on Ubuntu 15.10 using the latest ubuntu-sdk version.