Qt how to access resources

The correct way to load with Qt resources is: :/Images/Images/splash1.jpg.

What you could also do, is assign an alias to the resource. This way you don't need the .jpg: :/Images/splash


Qt5 resources explains all you need. You have to put the colon before the path in the source tree. You also have placed a prefix, so :/Images/Images/splash1.jpg. This will give you a path. If you need a URL, then use the qrc: scheme.


You can use ":/prefix/name of your image".

Tags:

Resources

Path

Qt