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.

Warning: 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, add **/.qmlls.ini to your top-level project .gitignore, for example. The globbing is required because .qmlls.ini files are generated in all source subdirectories that define QML Modules.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.