C
ImageFiles.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 で導入されました。
特定のQtライセンスの下で利用可能です。
詳細はこちらをご覧ください。