1 /****************************************************************************
3 ** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/
6 ** This file is part of the documentation of the Qt Toolkit.
8 ** $QT_BEGIN_LICENSE:FDL$
9 ** GNU Free Documentation License
10 ** Alternatively, this file may be used under the terms of the GNU Free
11 ** Documentation License version 1.3 as published by the Free Software
12 ** Foundation and appearing in the file included in the packaging of
16 ** Alternatively, this file may be used in accordance with the terms
17 ** and conditions contained in a signed written agreement between you
26 ****************************************************************************/
28 \page qtqml-cppclasses-topic.html
29 \title C++ Classes Provided by the Qt QML Module
30 \brief Overview of the C++ classes provided by the Qt QML module
32 The Qt QML module provides C++ classes which implement the QML framework.
33 Clients can use these classes to interact with the QML run-time (for example,
34 by injecting data or invoking methods on objects), and to instantiate a
35 hierarchy of objects from a QML document.
37 \section1 The QQmlEngine Class
39 The QQmlEngine class provides an engine which can manage a hierarchy of objects
40 which is defined in a QML document. It provides a root QML context within
41 which expressions are evaluated, and ensures that properties of objects are
42 updated correctly when required.
44 See \l{qtqml-cppclasses-engine.html}{Qt QML Module C++ Classes - QQmlEngine}
45 for in-depth information about QQmlEngine.
47 \section1 The QQmlComponent Class
49 The QQmlComponent class is used to load a QML document. It requires a
50 QQmlEngine in order to instantiate the hierarchy of objects defined in the QML
54 \l{qtqml-cppclasses-component.html}{Qt QML Module C++ Classes - QQmlComponent}
55 for in-depth information about QQmlComponent.
57 \section1 The QQmlContext Class
59 The QQmlContext class provides a context for object instantiation and
60 expression evaluation. All objects are instantiated in a particular context,
61 and all of the expressions which are evaluated while an application is running
62 are evaluated within a particular context. This context defines how symbols
63 are resolved, and thus which values the expression operates on.
65 See \l{qtqml-cppclasses-context.html}{Qt QML Module C++ Classes - QQmlContext}
66 for in-depth information about QQmlContext.
68 \section1 The QQmlExpression Class
70 The QQmlExpression class provides a way for clients to evaluate JavaScript
71 expressions from C++, using a particular QML evaluation context. This allows
72 clients to access QML objects by id, for example. The result of evaluation
73 is returned as a QVariant, and the conversion rules are defined by the QML
76 See \l{qtqml-cppclasses-expression.html}
77 {Qt QML Module C++ Classes - QQmlExpression} for in depth information about
80 \section1 The QQmlPropertyValueSource Class
82 The QQmlPropertyValueSource class is an abstract class which may be inherited
83 to provide unique \l{qtqml-typesystem-topic.html#property-modifier-types}
84 {property value sources}.
86 See \l{qtqml-cppclasses-valuesource.html}
87 {Qt QML Module C++ Classes - QQmlPropertyValueSource} for in depth information
88 about QQmlPropertyValueSource.