QML Image source not loading on to the screen
-
Image.qml file -
Cmake file -
Main.qml file -
File Structure -
I have my image in the
resources.qrc
file with the path:/images/assets/icons8-rocket-94.png
and urlqrc:/images/assets/icons8-rocket-94.png
I have tried the everything and still I can't get to load the image on to the screen.
I have tried the following -
source: "qrc:/images/assets/icons8-rocket-94.png" source: "qrc://images/assets/icons8-rocket-94.png" source: "qrc:///images/assets/icons8-rocket-94.png" source: "../assets/icons8-rocket-94.png" source: "C:/Users/username/Qt/learn_qt/qml_basics/qml_basic/assets"
Window -
still I can't able the load the image. Pls help!! -
Image.qml file -
Cmake file -
Main.qml file -
File Structure -
I have my image in the
resources.qrc
file with the path:/images/assets/icons8-rocket-94.png
and urlqrc:/images/assets/icons8-rocket-94.png
I have tried the everything and still I can't get to load the image on to the screen.
I have tried the following -
source: "qrc:/images/assets/icons8-rocket-94.png" source: "qrc://images/assets/icons8-rocket-94.png" source: "qrc:///images/assets/icons8-rocket-94.png" source: "../assets/icons8-rocket-94.png" source: "C:/Users/username/Qt/learn_qt/qml_basics/qml_basic/assets"
Window -
still I can't able the load the image. Pls help!!Image
also needs awidth
andheight
. -