C

--selector

A comma-separated list of selectors to pick a project variant.

Description

This options provide another way to specify file selectors for the whole project as mentioned in MCU.Config.fileSelector it will affects all modules included by the main project file. It can be used to reduce the number of qmlproject files by decoupling module files which were intended for a particular project variant from the main project through placing them in selector folders.

Usage

//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 previous command will include board1/v2/board.module with only the following lines in main.qmlproject
ModuleFiles {
    files: ["board.qmlproject"]
}

Since

This option was introduced in QmlProject API 1.3 .

Available under certain Qt licenses.
Find out more.