报错module ....... is not installed

qt中QQuickWidget窗口加载qmldir模块文件时,出现module ....... is not installed,是因为没有给引擎指定importpath路径,只需在加载qml之前给引擎添加importpath路径路径即可。如下图第二行

 

 添加的的qmdir文件在资源文件qrc中的路径。

 

posted @ 2022-12-16 20:20  小人物1112227  阅读(2440)  评论(0)    收藏  举报