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 ****************************************************************************/
29 \title QtQml Module Release Notes
30 \page qtqml-releasenotes.html
31 \inqmlmodule QtQuick 2.0
35 The QtQml C++ module is new in Qt 5. It provides the QML engine and implements
36 the QML language supporting infrastructure.
38 (Prior to Qt 5, this functionality was provided by the QtDeclarative module, which
39 has now been replaced by the new QtQml and QtQuick C++ modules.)
44 \li JavaScript engine has changed to V8.
45 \li Various parser and compiler optimizations have been implemented, as well as a new bindings optimizer.
46 \li New QQmlEngine::trimComponentCache() method safely discards unused data in the engine's component cache to free memory.
49 \section2 Component and Object creation
52 \li Loading/compilation can now be performed in a separate thread. Enable this by loading a \l Loader object asynchronously through its \l{Loader::}{source} property, or by passing the \c Component.Asynchronous parameter to \c Qt.createComponent().
53 \li The component returned by \c Qt.createComponent() is no longer parented to the engine. Be sure to hold a reference, or provide a parent.
59 \li New \l var property type. This is a general-purpose property type which obsoletes the \l variant type.
60 Properties of the \l var type may hold JavaScript references.
61 \li QML properties of type \l var and \l variant can now hold pixmaps. See \l {Scarce Resources in JavaScript} for more information.
62 \li Value type improvements:
64 \li QColor is now a value type. The red, green, blue and alpha channels of a \l color property can be accessed via \c r, \c g, \c b and \c a properties.
65 \li Improved support for QVector4D, now constructible in QML via \c Qt.vector4d().
67 \li Support for sequence types QList<int>, QList<qreal>, QList<bool>, QList<QUrl>,
68 QList<QString> and QStringList has been improved. QObjects can define Q_PROPERTYs of
69 these types which can be accessed transparently from JavaScript.
72 \section2 Modules and Imports
75 \li Arbitrary functionality may be provided in a namespace through a Module API. See qmlRegisterModuleApi() for more information.
76 \li JavaScript (.js) files may now import QML modules and other JavaScript files using the ".import" syntax.
82 \li QQmlExpression can now be constructed directly (and more efficiently) from a QQmlScriptString.