doc: qt_add_qml_module links to qmltc's doc about private headers

Add a note in qt_add_qml_module that qmltc requires private headers in
the ENABLE_TYPE_COMPILER section, and link to the part of the
documentation of qmltc that explains how to compile QML to C++ using
CMake.

Fixes: QTBUG-117451
Pick-to: 6.5 6.6
Change-Id: Ie5e6e6c92a10ef4822e5a712bb31e06bdce6bf5e
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
This commit is contained in:
Sami Shalayel 2023-09-25 10:16:21 +02:00
parent 16023fc77c
commit f9eabe862b
1 changed files with 8 additions and 0 deletions

View File

@ -338,6 +338,14 @@ how to set the \c QT_QML_SINGLETON_TYPE property.
\target qmltc-cmake
\section2 Compiling QML to C++ with QML type compiler
\note The \l{QML type compiler} \c{qmltc} does not guarantee that the generated
C++ stays API-, source- or binary-compatible between past or future versions,
even patch versions.
Furthermore, qmltc-compiled apps using Qt's QML modules will require linking
against private Qt API, see also
\l{QML type compiler#compiling-qml-code-with-qmltc}{Compiling QML code with qmltc}.
If a QML module has \c{.qml} files, you can compile them to C++ using \l{QML
type compiler}{qmltc}. Unlike \l{qmlcachegen-auto}{bytecode compilation}, you
have to explicitly enable qmltc via \l{ENABLE_TYPE_COMPILER} argument. In which