Loading image with Qmlscene
-
Hi all, I don't understand why when I try to run a simple qml file with the qml scene tool , I have the message "cannot open file://..."
but when I run the c++ code loading the qml with the Qml Application Engine, everything is oK.Is it impossible to display images with the qml scene ?
Thank you in advance for your answer.
-
Are you sure the paths are correct? Do you run qmlscene and your app from the same working directory?
-
Run qmlscene from C:\REPO\test\build-test_qmlscene-Desktop_Qt_5_11_3_MinGW_32bit-Debug, same as you run your app. Or add that folder to QML import path using
-I
flag. More info: https://doc.qt.io/qt-5/qtquick-qmlscene.htmlThat is assuming that you are using relative paths to load QML. If you're using QRC qmlscene won't work.