Can't load Image source in QML Image

后端 未结 6 910
小鲜肉
小鲜肉 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:50

    I had a similiar problem and solved it the following way:

    1. Right click on your qml.qrc, then choose "open with" -> "Resource Editor"
    2. Once you are in the Resource Editor click on "Add missing file", there choose your image
    3. Lastly open your qml file in the Design editor and click on the Image element, on the right side choose the path to the image

提交回复
热议问题