Can't load Image source in QML Image

后端 未结 6 909
小鲜肉
小鲜肉 2021-02-07 03:08

This seems really basic but for some reason I can\'t get the image source to work in the ultra-simple QML app below.

FYI, I\'m running Mac OS-X 10.9.5, Qt Creator 3.2.

6条回答
  •  情书的邮戳
    2021-02-07 03:37

    There can be two problems:

    1. The image is corrupt, although the image was correctly displayed in all previews IconImage refuses to load it. Try to use another image that is known as work correctly It seems that the Qt Image loader is very sensitive to the image format.
    2. There is a resource cache problem. Try to delete qml_qmlcachea.qrc in your compiling folder and try it again

提交回复
热议问题