Qt5 Qml import folder and qrc problem

来源:互联网 发布:vivo授权网络怎么弄 编辑:程序博客网 时间:2024/04/30 09:37

we can import folder in qml

like:

import "subFolder" as myCompoment


but when we put the root qml in a qrc,

and set the qrc profix as /

we had to add a new folder in qrc, like /subFolder or else QmlEngine will not found that folder for import

after that we can compile


new problem is when we do that, qtcreator don't konw that folder, if that subFolder is a common resource at any other place.

so we had to make a softlink for that ,and put it in root qml's folder to let qtcreator known


it's not smart, but work.


0 0
原创粉丝点击