diff --git a/Software/Development/Environment/Qt/QML/QML_应用程序开发技术总结.md b/Software/Development/Environment/Qt/QML/QML_应用程序开发技术总结.md index 4946b54..b4f2301 100644 --- a/Software/Development/Environment/Qt/QML/QML_应用程序开发技术总结.md +++ b/Software/Development/Environment/Qt/QML/QML_应用程序开发技术总结.md @@ -905,20 +905,20 @@ resources.files = main.qml resources.prefix = /$${TARGET} ``` -当我们向工程增加自定义 QML 文件时,会被增加到 DISTFILES 字段,比如: +当使用 QtCreator 新建文件向导向工程增加自定义 QML 文件时,QML 文件可能会被错误的增加到 DISTFILES 字段,比如: ```js DISTFILES += \ Demo.qml ``` -这会导致无法将 Demo.qml 加如到系统自建的 .qrc 文件中,此时会报: +此时编译程序会报: ```js failed to load component ... is not a type ``` -错误,此时需要手动添加 Demo.qml 到 resources.files 字段中。 +错误。解决方法是:手动修改 Demo.qml 到 resources.files 字段中即可。 ### 8.2. 如何引用自定义 QML 文件