本页内容

C

BinaryFiles.MCU.base

定义资源的基路径。

说明

基路径决定了计算出的资源 URI 的锚点。当使用通过“files”或“directory”属性定义的资源时,路径中将省略基名,如下例所示。

用法

该属性可在主应用程序的.qmlproject 文件或模块的.qmlproject 文件中使用。其参数类型为字符串。

代码示例:

# In myproject.qmlproject file
BinaryFiles {
    MCU.base: "data"
    files: ["data/map/set1.bin", "data/map/set2.bin"]
}

# In C++
Qul::BinaryResource mapDataSet1("map/set1.bin"); // The base "data" is not included in the source path

Qul::BinaryResource mapDataSet2("map/set2.bin"); // The base "data" is not included in the source path

由于

该属性自Qt Quick Ultralite 2.9 起引入。

在某些 Qt 许可下可用。
了解更多。