Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.12.1
-
None
Description
Working on a qml application for Android under Windows 10 64 bit.
I stored an image file in qrc file and checked the documentation for the proper reference to be used in qml. I stumbled over a couple of notations starting with and without '/'. Also in some apparently non-Qt-insider tutorial II could not find a solution.
Finally I started this thread https://forum.qt.io/topic/100893/displaying-an-image-in-qml and got diverse responses. The working solution for my problem is that I need to use the prefix "qrc:///" and the file is found and included (see also thread).
After I knew this I could also find some reference in https://doc.qt.io/qt-5/resources.html , but that is very easy overlooked. I have checked a couple of official Qt examples for QML for instance https://doc.qt.io/qt-5/qtquick-imageelements-example.html . The code does not show the prefix either.
Therefore, there should be a reference included of what the proper way working on all OS is and it would be good also if the documentation and example are going to be showing this "official" notation.