- Qt 6.7
- Qt QML
- CMake Global Variables in Qt6 Qml
- QT_QML_GENERATE_QMLLS_INI
- Qt 6.7.1 Reference Documentation

# QT_QML_GENERATE_QMLLS_INI

This variable was introduced in Qt 6.7.

`QT_QML_GENERATE_QMLLS_INI` is a boolean that describes whether qt6_add_qml_module() calls generate `.qmlls.ini` files inside the source folder, into each subdirectory with a CMakeLists.txt file creating a QML module. If `.qmlls.ini` files already exist there, then they are overwritten.

Note: Using `QT_QML_GENERATE_QMLLS_INI` requires a CMake version >= 3.19.

These `.qmlls.ini` files contain the path to the last configured build directory, and is needed by QML Language Server to find user defined modules. See also QML Language Server about the other ways of passing build folders to QML Language Server.

As This variable is used for IDE integration, it should normally not be set in a project itself, but passed to CMake via an IDE or manually by passing

     -DQT_QML_GENERATE_QMLLS_INI=ON

to the cmake executable.

Note: The files generated by `QT_QML_GENERATE_QMLLS_INI` are only valid for the current configuration and should be ignored by your version control system. For git, this can be done by adding `.qmlls.ini` to your `.gitignore`, for example.