使用 QtCreator 时,我在编辑器中显示一个 qml 文件。qml 文件用于名为main.qml插件的文件。
然后我点击Design按钮。它显示错误消息:QML module not found。
如果我获取Go to error链接,它将转到包含以下内容的行import com.name.os.app.all 1.0。这是插件所需的各种组件 qml 文件的位置。
我已将路径添加c:\users\me\ui\viewer\到我的QML_IMPORT_PATH env变量。如果 QtCreater 将com.name...from qml 文件导入语句附加到我添加到的路径名QML_IMPORT_PATH,它将找到所需的目录。它没有。
该项目使用qmake。
我尝试使用为我的主 qml 视图容器文件qmlplugindump.exe生成一个qmltypes文件,但qmlplugindump.exe给我一个错误,说component is not readyand file::///c:/Users/name/ui/viewer/modules/app/qml/com/name/os/app/all/typelist.qml:2:1 module MyViewContainer.qml is not installed。
我使用的命令是qmlplugindump.exe MyViewContainer.qml 1.0 c:\users\myname\ui\viewer\modules\app\qml\com\name\os\app\all\ > ...

