C
BinaryFiles.MCU.prefix
为二进制资源 URI 添加一个通用前缀。
描述
prefix 节点会在用于访问资源的URI前添加一个通用前缀。
用法
该属性可在主应用程序的 `.qmlproject ` 文件或模块的 `.qmlproject ` 文件中使用。它接受字符串参数。
代码示例:
# In myproject.qmlproject file
BinaryFiles {
// Specify the prefix for resources declared within the current node
MCU.prefix: "assets"
files: ["map/dataset.bin"]
}
# In C++
Qul::BinaryResource dataset("assets/map/dataset.bin");自
该属性于Qt Quick Ultralite 2.9 版本中引入。
在某些 Qt 许可证下可用。
了解更多信息。