Thank you for your answer, I tried your suggestion and it didn't work. Have spent another day working on this.
Create another blank test app instead of sound just trying to get one image to load OUTSIDE the qrc resource file.
Get anything to load externally.......
Code:
viewer.setSource(QUrl("qrc:/qml/testingQRC/main.qml"));
In the main.qml I have just one image
Code:
Image {
id: tempImage
x: 61
y: 230
source: "Icon.png"
}
The compiler error
Code:
qrc:/qml/testingQRC/main.qml:24:5: QML Image: Cannot open: qrc:/qml/testingQRC/Icon.png
It is looking for the file in the qrc resource file. (which it isn't there as the attempt is to load external file outside resource)
I then have added to the pro file like so
OTHER_FILES += \
qml/testingQRC/Icon.png (throws same error as above)
new attempts
Code:
source: "file:Icon.png" Compiler error QML Image: Cannot open: file:Icon.png
source: "file:/Icon.png" Compiler error QML Image: Cannot open: file:///Icon.png
and I've tried all variations of file: /// or // or ../ or ../../
When I use source: file:Icon.png there is no wriggly line so qt creator sees the file.
Every where I have read says I should just add file:/ and it will work....
I found this link querying the same problem
https://bugreports.qt-project.org/browse/QTBUG-15438
It states
The correct behaviour is that a "file:/" is required.
as sound can not be added to qt resource file and then play on phone, it needs to be added externally.
Very frustrating.....
So any ideas? or does anyone have code that actually works, that I could try?
I am on win7 and