qmlscene:无法找到自定义包:未安装模块

qmlscene:无法找到自定义包:未安装模块,qml,Qml,我有一堆QML文件打包在一起,形成“CommonControls”定制包。 我使用“CommonControls”中的项目,使用“import CommonControls 1.0”语句开发另一个QML文件 使用“qmlscene”,我想运行开发的QML文件,但无法找到“CommonControls”包 使用以下选项解决依赖关系,但失败 qmlscene仪表板ViewFunctionBar.qml 错误:>file:///C:/Bin/Views/Base/DashboardView.qml:

我有一堆QML文件打包在一起,形成“CommonControls”定制包。 我使用“CommonControls”中的项目,使用“import CommonControls 1.0”语句开发另一个QML文件

使用“qmlscene”,我想运行开发的QML文件,但无法找到“CommonControls”包

使用以下选项解决依赖关系,但失败

  • qmlscene仪表板ViewFunctionBar.qml 错误:>file:///C:/Bin/Views/Base/DashboardView.qml:2 未安装模块“CommonControls”

  • 使用“-I”导入选项

    qmlscene-I……\Bin\CommonControls DashboardView.qml 错误:>file:///C:/Bin/Views/Base/DashboardView.qml:2 未安装模块“CommonControls”

  • 使用带绝对路径的“-I”

    qmlscene-I C:\Bin\CommonControls DashboardView.qml 错误:>file:///C:/Bin/Views/Base/DashboardView.qml:2 未安装模块“CommonControls”


  • 我在这里遗漏了什么?

    如果您正在导入“CommonControls”,那么您可能应该将包含CommonControls的文件夹作为子文件夹传递,而不是CommonControls文件夹本身。这很有效!谢谢如果您要导入“CommonControls”,那么您可能应该将包含CommonControls的文件夹作为子文件夹传递,而不是CommonControls文件夹本身。这很有效!谢谢