Commit d723e197 authored by Leena Miettinen's avatar Leena Miettinen
Browse files

Doc: QML and C++

Change-Id: Ic0d5906cdd16a08196d4240265f4179a93936f5e
Reviewed-by: default avatarChristian Kamm <>
parent 16c6c279
......@@ -1027,6 +1027,18 @@
extra type information for code completion and the semantic checks to work
When you write a QML module or use QML from a C++ application you typically
register new types with
{qmlRegisterType} or expose some class instances with
{setContextProperty}. The \QC C++ code model now scans for these calls and
tells the QML code model about them. This means that properties are
displayed during code completion and the JavaScript code checker does not
complain about unknown types. However, this works only when the source code
is available, and therefore, you must explicitly generate type information
for QML modules with plugins before distributing them.
Ideally, QML modules have a \c{plugins.qmltypes} file in the same directory
as the \c qmldir file. The \c qmltypes file contains a description of the
components exported by the module's plugins and is loaded by \QC
......@@ -1035,7 +1047,7 @@
For Qt 4.8 and later, one or more \c qmltypes files can be listed in the
\c qmldir file under the \c typeinfo header. These files will be read in addition
to \c{plugins.qmltypes}. For more information, see
\l{}{Writing a qmldir File}.
\l{}{Writing a qmldir File}.
\section1 Generating qmltypes Files
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment