This command was introduced in Qt 6.3.



If versionless commands are disabled, use qt6_webengine_add_dictionary() instead. It supports the same set of arguments as this command.


A spell checker in Qt Web Engine needs dictionaries in a specific binary format. This CMake command converts dictionaries from the Hunspell project. into the bdict binary format. It creates a qtwebengine_dictionaries target, which your project can use as a dependency. This way your project can easily add dictionaries for the spell checker. Refer to the spell checker example for more details.


TARGET is an optinal argument and specifies the name of the application target that should depend on qtwebengine_dictionaries target. In other words it is used to define a build dependency to create the binary format of dictionaries before building TARGET.

SOURCE is the absolute path to the Hunspell project dictionary for which a corresponding binary format (.bdict) will be created.

OUTPUT_DIRECTORY is an optional argument and specifies the directory where the binary format of the dictionary will be created. If not specified, CMAKE_CURRENT_BINARY_DIR will be used as OUTPUT_DIRECTORY.

Note: The qtwebengine_dictionaries directory or <CONFIG>/qtwebengine_dictionaries directories in the case of the multi-config generator is appended to OUTPUT_DIRECTORY. This helps to utilize dictionaries, as the webengine_dictionaries directory is the default search location.

© 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.