C
イメージファイル.MCU.base
アセットのベースパスを定義します。
説明
ベースパスは、計算されたリソースURIのアンカーを決定します。files "または "directory "プロパティを使用して定義されたリソースを使用する場合、以下の例に示すように、ベース名はパスから省略されます。
使用法
このプロパティは、メイン・アプリケーション.qmlproject ファイル、またはモジュール.qmlproject ファイルで使用できます。文字列を受け取ります。
コード例
# In myproject.qmlproject file
ImageFiles {
// Specify the base image paths declared in the current node
MCU.base: "images"
files: ["images/small/foo.png", "pics/small/bar.png"]
}
# In CustomItem.qml
Image {
id: image1
source: "/small/foo.png" // The base "images" is not included in the source path
}
Image {
id: image2
source: "/pics/small/bar.png" // image2 is not in images, "base" has not effect
}から
このプロパティは QmlProject API 1.3 で導入されました。