本页面内容

C

–selector

用于选择项目变体的、以逗号分隔的选择器列表。

说明

这些选项提供了另一种为整个项目指定文件选择器的方式(如MCU.Config.fileSelector 中所述),它们将影响主项目文件中包含的所有模块。您可以通过将针对特定项目变体的模块文件放置在选择器文件夹中,将其与主项目解耦,从而减少 qmlproject 文件的数量。

用法

//file structure
// main.qml
// ... resource files
// main.qmlproject
// +board1
//      board.qmlproject
//      board_icon.png
//      +v2
//          board.qmlproject
// +board2
//      board.qmlproject
//      board_icon.png

qmlprojectexporter main.qmlproject --selector=board1,v2

// The earlier command will include board1/v2/board.module with only the following lines in \c main.qmlproject
ModuleFiles {
    files: ["board.qmlproject"]
}

自

该选项是在 QmlProject API 1.3 中引入的。

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