From 32c54e57098b6799f41a3654a670a68619922f9e Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Wed, 17 Apr 2013 17:19:35 +0200 Subject: [PATCH] Doc: Refactored and focused the Qt QML documentation. Before it wasn't clear to what the module provided, especially with the coupling of Qt QML and Qt Quick. The doc is centered around these documentation: -QML refernce: the language syntax and the application constructs -JavaScript environment: the environment provided by the module -Integration with C++: more about the engine and the C++ API -QML Types and Classes reference (created by \qmlmodule and \module) The distinction are made in the directory and the section titles in the Qt QML landing page. Change-Id: I033bfcbf8368b94ffa5ee4b1225bee74347f53eb Reviewed-by: Martin Smith --- src/qml/doc/src/cppclasses/topic.qdoc | 18 +- .../documents/definetypes.qdoc | 0 .../documents/networktransparency.qdoc | 0 .../src/{ => qmllanguageref}/documents/scope.qdoc | 0 .../{ => qmllanguageref}/documents/structure.qdoc | 0 .../src/{ => qmllanguageref}/documents/topic.qdoc | 0 .../{ => qmllanguageref}/modules/cppplugins.qdoc | 0 .../modules/identifiedmodules.qdoc | 0 .../modules/legacymodules.qdoc | 0 .../src/{ => qmllanguageref}/modules/qmldir.qdoc | 0 .../src/{ => qmllanguageref}/modules/topic.qdoc | 0 src/qml/doc/src/qmllanguageref/qmlreference.qdoc | 112 ++++++++++++ .../src/{ => qmllanguageref}/syntax/basics.qdoc | 0 .../syntax/directoryimports.qdoc | 0 .../src/{ => qmllanguageref}/syntax/imports.qdoc | 0 .../syntax/objectattributes.qdoc | 0 .../syntax/propertybinding.qdoc | 0 .../src/{ => qmllanguageref}/syntax/signals.qdoc | 0 .../typesystem/basictypes.qdoc | 0 .../typesystem/objecttypes.qdoc | 0 .../src/{ => qmllanguageref}/typesystem/topic.qdoc | 0 src/qml/doc/src/qmltypereference.qdoc | 133 -------------- src/qml/doc/src/qtqml.qdoc | 201 ++++++++------------- 23 files changed, 201 insertions(+), 263 deletions(-) rename src/qml/doc/src/{ => qmllanguageref}/documents/definetypes.qdoc (100%) rename src/qml/doc/src/{ => qmllanguageref}/documents/networktransparency.qdoc (100%) rename src/qml/doc/src/{ => qmllanguageref}/documents/scope.qdoc (100%) rename src/qml/doc/src/{ => qmllanguageref}/documents/structure.qdoc (100%) rename src/qml/doc/src/{ => qmllanguageref}/documents/topic.qdoc (100%) rename src/qml/doc/src/{ => qmllanguageref}/modules/cppplugins.qdoc (100%) rename src/qml/doc/src/{ => qmllanguageref}/modules/identifiedmodules.qdoc (100%) rename src/qml/doc/src/{ => qmllanguageref}/modules/legacymodules.qdoc (100%) rename src/qml/doc/src/{ => qmllanguageref}/modules/qmldir.qdoc (100%) rename src/qml/doc/src/{ => qmllanguageref}/modules/topic.qdoc (100%) create mode 100644 src/qml/doc/src/qmllanguageref/qmlreference.qdoc rename src/qml/doc/src/{ => qmllanguageref}/syntax/basics.qdoc (100%) rename src/qml/doc/src/{ => qmllanguageref}/syntax/directoryimports.qdoc (100%) rename src/qml/doc/src/{ => qmllanguageref}/syntax/imports.qdoc (100%) rename src/qml/doc/src/{ => qmllanguageref}/syntax/objectattributes.qdoc (100%) rename src/qml/doc/src/{ => qmllanguageref}/syntax/propertybinding.qdoc (100%) rename src/qml/doc/src/{ => qmllanguageref}/syntax/signals.qdoc (100%) rename src/qml/doc/src/{ => qmllanguageref}/typesystem/basictypes.qdoc (100%) rename src/qml/doc/src/{ => qmllanguageref}/typesystem/objecttypes.qdoc (100%) rename src/qml/doc/src/{ => qmllanguageref}/typesystem/topic.qdoc (100%) diff --git a/src/qml/doc/src/cppclasses/topic.qdoc b/src/qml/doc/src/cppclasses/topic.qdoc index 8b97048..66a374e 100644 --- a/src/qml/doc/src/cppclasses/topic.qdoc +++ b/src/qml/doc/src/cppclasses/topic.qdoc @@ -29,7 +29,7 @@ \title Important C++ Classes Provided By The Qt QML Module \brief Overview of the C++ classes provided by the Qt QML module -The Qt QML module provides C++ classes which implement the QML framework. +The \l{Qt QML} module provides C++ classes which implement the QML framework. Clients can use these classes to interact with the QML run-time (for example, by injecting data or invoking methods on objects), and to instantiate a hierarchy of objects from a QML document. The Qt QML module provides more @@ -113,4 +113,20 @@ engine. See the \l{QQmlExpression} class documentation for in depth information about how to use QQmlExpression in an application. +\section1 Usage of the Classes within QML Applications + +These pages describe how to create QML applications which interact with the +C++ classes: + +\list +\li \l{qtqml-cppintegration-topic.html}{Integrating QML and C++} + \list + \li \l{qtqml-cppintegration-exposecppattributes.html}{Exposing Attributes of C++ Classes to QML} + \li \l{qtqml-cppintegration-definetypes.html}{Defining QML Types from C++} + \li \l{qtqml-cppintegration-contextproperties.html}{Embedding C++ Objects into QML with Context Properties} + \li \l{qtqml-cppintegration-interactqmlfromcpp.html}{Interacting with QML Objects from C++} + \li \l{qtqml-cppintegration-data.html}{Data Type Conversion Between QML and C++} + \endlist +\endlist + */ diff --git a/src/qml/doc/src/documents/definetypes.qdoc b/src/qml/doc/src/qmllanguageref/documents/definetypes.qdoc similarity index 100% rename from src/qml/doc/src/documents/definetypes.qdoc rename to src/qml/doc/src/qmllanguageref/documents/definetypes.qdoc diff --git a/src/qml/doc/src/documents/networktransparency.qdoc b/src/qml/doc/src/qmllanguageref/documents/networktransparency.qdoc similarity index 100% rename from src/qml/doc/src/documents/networktransparency.qdoc rename to src/qml/doc/src/qmllanguageref/documents/networktransparency.qdoc diff --git a/src/qml/doc/src/documents/scope.qdoc b/src/qml/doc/src/qmllanguageref/documents/scope.qdoc similarity index 100% rename from src/qml/doc/src/documents/scope.qdoc rename to src/qml/doc/src/qmllanguageref/documents/scope.qdoc diff --git a/src/qml/doc/src/documents/structure.qdoc b/src/qml/doc/src/qmllanguageref/documents/structure.qdoc similarity index 100% rename from src/qml/doc/src/documents/structure.qdoc rename to src/qml/doc/src/qmllanguageref/documents/structure.qdoc diff --git a/src/qml/doc/src/documents/topic.qdoc b/src/qml/doc/src/qmllanguageref/documents/topic.qdoc similarity index 100% rename from src/qml/doc/src/documents/topic.qdoc rename to src/qml/doc/src/qmllanguageref/documents/topic.qdoc diff --git a/src/qml/doc/src/modules/cppplugins.qdoc b/src/qml/doc/src/qmllanguageref/modules/cppplugins.qdoc similarity index 100% rename from src/qml/doc/src/modules/cppplugins.qdoc rename to src/qml/doc/src/qmllanguageref/modules/cppplugins.qdoc diff --git a/src/qml/doc/src/modules/identifiedmodules.qdoc b/src/qml/doc/src/qmllanguageref/modules/identifiedmodules.qdoc similarity index 100% rename from src/qml/doc/src/modules/identifiedmodules.qdoc rename to src/qml/doc/src/qmllanguageref/modules/identifiedmodules.qdoc diff --git a/src/qml/doc/src/modules/legacymodules.qdoc b/src/qml/doc/src/qmllanguageref/modules/legacymodules.qdoc similarity index 100% rename from src/qml/doc/src/modules/legacymodules.qdoc rename to src/qml/doc/src/qmllanguageref/modules/legacymodules.qdoc diff --git a/src/qml/doc/src/modules/qmldir.qdoc b/src/qml/doc/src/qmllanguageref/modules/qmldir.qdoc similarity index 100% rename from src/qml/doc/src/modules/qmldir.qdoc rename to src/qml/doc/src/qmllanguageref/modules/qmldir.qdoc diff --git a/src/qml/doc/src/modules/topic.qdoc b/src/qml/doc/src/qmllanguageref/modules/topic.qdoc similarity index 100% rename from src/qml/doc/src/modules/topic.qdoc rename to src/qml/doc/src/qmllanguageref/modules/topic.qdoc diff --git a/src/qml/doc/src/qmllanguageref/qmlreference.qdoc b/src/qml/doc/src/qmllanguageref/qmlreference.qdoc new file mode 100644 index 0000000..34336c2 --- /dev/null +++ b/src/qml/doc/src/qmllanguageref/qmlreference.qdoc @@ -0,0 +1,112 @@ +/**************************************************************************** +** +** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). +** Contact: http://www.qt-project.org/legal +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Free Documentation License Usage +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of +** this file. Please review the following information to ensure +** the GNU Free Documentation License version 1.3 requirements +** will be met: http://www.gnu.org/copyleft/fdl.html. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! +\page qmlreference.html +\title The QML Reference +\brief A declarative language for application development + +QML is a declarative language for creating highly dynamic applications. With +QML, application building blocks such as UI components are \e declared and +various properties set to define the application behavior. When coupled with +JavaScript, application behavior becomes scriptable. In addition, QML heavily +uses Qt, which allows types and other Qt features to be accessible directly from +QML applications. + +This reference guide describes the features of the QML language. Many of the +QML types in the guide originate from the \l{Qt QML} or \l{Qt Quick} +modules. + +\list + \li \l{qtqml-syntax-basics.html}{QML Syntax Basics} + \list + \li \l{qtqml-syntax-imports.html}{Import Statements} + \li \l{qtqml-syntax-basics.html#object-declarations}{Object Declarations} + \list + \li \l{qtqml-syntax-basics.html#child-objects}{Child Objects} + \endlist + \li \l{qtqml-syntax-basics.html#comments}{Comments} + \endlist + + \li \l{qtqml-javascript-topic.html}{Integrating QML and JavaScript} + \list + \li \l{qtqml-javascript-expressions.html}{Using JavaScript Expressions with QML} + \li \l{qtqml-javascript-dynamicobjectcreation.html}{Dynamic QML Object Creation from JavaScript} + \li \l{qtqml-javascript-resources.html}{Defining JavaScript Resources In QML} + \li \l{qtqml-javascript-imports.html}{Importing JavaScript Resources In QML} + \li \l{qtqml-javascript-hostenvironment.html}{JavaScript Host Environment} + \endlist + + \li \l{qtqml-syntax-objectattributes.html}{QML Object Attributes} + \list + \li \l{qtqml-syntax-objectattributes.html#the-id-attribute}{The \e id Attribute} + \li \l{qtqml-syntax-objectattributes.html#property-attributes}{Property Attributes} + \li \l{qtqml-syntax-objectattributes.html#signal-attributes}{Signal Attributes} + \li \l{qtqml-syntax-objectattributes.html#method-attributes}{Method Attributes} + \li \l{qtqml-syntax-objectattributes.html#attached-properties-and-attached-signal-handlers}{Attached Properties and Attached Signal Handlers} + \endlist + + \li \l{qtqml-syntax-propertybinding.html}{Property Binding} + \li \l{qtqml-syntax-signals.html}{Signal and Handler Event System} + + \li \l{qtqml-typesystem-topic.html}{The QML Type System} + \list + \li \l{qtqml-typesystem-basictypes.html}{Basic Types} + \li \l{qtqml-typesystem-topic.html#javascript-types}{JavaScript Types} + \li \l{qtqml-typesystem-objecttypes.html}{QML Object Types} + \list + \li \l{qtqml-documents-definetypes.html}{Defining Object Types from QML} + \li \l{qtqml-cppintegration-definetypes.html}{Defining Object Types from C++} + \endlist + \endlist + + \li \l{qtqml-modules-topic.html}{QML Modules} + \list + \li \l{qtqml-modules-qmldir.html}{Specifying A QML Module} + \li \l{qtqml-modules-topic.html#supported-qml-module-types}{Supported QML Module Types} + \list + \li \l{qtqml-modules-identifiedmodules.html}{Identified Modules} + \li \l{qtqml-modules-legacymodules.html}{Legacy Modules} + \endlist + \li \l{qtqml-modules-cppplugins.html}{Providing Types and Functionality in a C++ Plugin} + \endlist + + \li \l{qtqml-documents-topic.html}{QML Documents} + \list + \li \l{qtqml-documents-structure.html}{Structure of a QML Document} + \li \l{Syntax of the QML Language} + \li \l{qtqml-documents-definetypes.html}{Defining Object Types through QML Documents} + \list + \li \l{qtqml-documents-definetypes.html#defining-an-object-type-with-a-qml-file}{Defining an Object Type with a QML File} + \li \l{qtqml-documents-definetypes.html#accessible-attributes-of-custom-types}{Accessible Attributes of Custom Types} + \endlist + \li \l{qtqml-documents-networktransparency.html}{Resource Loading and Network Transparency} + \li \l{qtqml-documents-scope.html}{Scope and Naming Resolution} + \endlist +\endlist + +*/ diff --git a/src/qml/doc/src/syntax/basics.qdoc b/src/qml/doc/src/qmllanguageref/syntax/basics.qdoc similarity index 100% rename from src/qml/doc/src/syntax/basics.qdoc rename to src/qml/doc/src/qmllanguageref/syntax/basics.qdoc diff --git a/src/qml/doc/src/syntax/directoryimports.qdoc b/src/qml/doc/src/qmllanguageref/syntax/directoryimports.qdoc similarity index 100% rename from src/qml/doc/src/syntax/directoryimports.qdoc rename to src/qml/doc/src/qmllanguageref/syntax/directoryimports.qdoc diff --git a/src/qml/doc/src/syntax/imports.qdoc b/src/qml/doc/src/qmllanguageref/syntax/imports.qdoc similarity index 100% rename from src/qml/doc/src/syntax/imports.qdoc rename to src/qml/doc/src/qmllanguageref/syntax/imports.qdoc diff --git a/src/qml/doc/src/syntax/objectattributes.qdoc b/src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc similarity index 100% rename from src/qml/doc/src/syntax/objectattributes.qdoc rename to src/qml/doc/src/qmllanguageref/syntax/objectattributes.qdoc diff --git a/src/qml/doc/src/syntax/propertybinding.qdoc b/src/qml/doc/src/qmllanguageref/syntax/propertybinding.qdoc similarity index 100% rename from src/qml/doc/src/syntax/propertybinding.qdoc rename to src/qml/doc/src/qmllanguageref/syntax/propertybinding.qdoc diff --git a/src/qml/doc/src/syntax/signals.qdoc b/src/qml/doc/src/qmllanguageref/syntax/signals.qdoc similarity index 100% rename from src/qml/doc/src/syntax/signals.qdoc rename to src/qml/doc/src/qmllanguageref/syntax/signals.qdoc diff --git a/src/qml/doc/src/typesystem/basictypes.qdoc b/src/qml/doc/src/qmllanguageref/typesystem/basictypes.qdoc similarity index 100% rename from src/qml/doc/src/typesystem/basictypes.qdoc rename to src/qml/doc/src/qmllanguageref/typesystem/basictypes.qdoc diff --git a/src/qml/doc/src/typesystem/objecttypes.qdoc b/src/qml/doc/src/qmllanguageref/typesystem/objecttypes.qdoc similarity index 100% rename from src/qml/doc/src/typesystem/objecttypes.qdoc rename to src/qml/doc/src/qmllanguageref/typesystem/objecttypes.qdoc diff --git a/src/qml/doc/src/typesystem/topic.qdoc b/src/qml/doc/src/qmllanguageref/typesystem/topic.qdoc similarity index 100% rename from src/qml/doc/src/typesystem/topic.qdoc rename to src/qml/doc/src/qmllanguageref/typesystem/topic.qdoc diff --git a/src/qml/doc/src/qmltypereference.qdoc b/src/qml/doc/src/qmltypereference.qdoc index 799945f..6952a77 100644 --- a/src/qml/doc/src/qmltypereference.qdoc +++ b/src/qml/doc/src/qmltypereference.qdoc @@ -24,137 +24,6 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ -/*! -\qmlmodule QtQml 2 -\title Qt QML QML Types -\ingroup qmlmodules -\brief List of QML types provided by the Qt QML module - -The \c QtQml module provides the definition and implementation of various -convenience types which can be used with the QML language, including some -elementary QML types which can provide the basis for further extensions to the -QML language. - -The \c QtQml module provides the \c QtObject and \c Component object types -which may be used in QML documents. These types are non-visual and provide -building-blocks for extensions to QML. - -\section1 Importing QtQml - -The types provided by the \c QtQml module are only available in a QML document -if that document imports the \c QtQml namespace (or if the document imports the -\c QtQuick namespace, as noted below). - -The current version of the \c QtQml module is version 2.0, and thus it may be -imported via the following statement: - -\qml -import QtQml 2.0 -\endqml - -Most clients will never need to use the \c QtQml import, as all of the types -and functionality provided by the \c QtQml namespace are also provided by the -\c QtQuick namespace which may be imported as follows: - -\qml -import QtQuick 2.0 -\endqml - -See the \l{Qt Quick} module documentation for more information about the -\c QtQuick namespace and what it provides to QML application developers. - -The documentation for the types below applies equally to the types of the same -name provided by the \l{Qt Quick} module, as they are in fact identical. - -\section1 Basic Types - -The following \l{qtqml-typesystem-basictypes.html}{QML basic types} are -provided: - -\annotatedlist qtqmlbasictypes - -\section1 Object Types - -The following \l{qtqml-typesystem-objecttypes.html}{QML object types} are -provided: - -\section2 QtObject - -The \c QtObject type provides a basic instantiable object which can be used in -QML applications. It is non-visual, but may have properties, methods, signals -and signal handlers. - -For example, the following QtObject has several properties, one of which has -been assigned a \l{Property Binding} -{binding}, and a \l{Signal and Handler Event System}{signal handler} for -the default change signal which exists for one of its properties: - -\code - import QtQuick 2.0 - - QtObject { - property int a: 15 - property int b: a + 22 - property int changeCount: 0 - - onAChanged: { - changeCount += 1; - } - } -\endcode - -\section2 Component - -The \c Component type provides a basic re-usable component which allows -instances of another type to be instantiated on-demand. It may be given an -\c id and it has a default property which is the object type to instantiate, -but no other properties may be added to it. - -For example, the following QtObject has two different \l Component -properties, and it uses those components to dynamically construct objects at -run-time: - -\code - import QtQuick 2.0 - - QtObject { - id: root - property bool which: true - - property Component a: Component { - id: firstComponent - QtObject { - property int answer: 42 - function activate() { - console.log("The answer is: " + answer); - } - } - } - - property Component b: Component { - id: secondComponent - QtObject { - property string message: "Hello, World!" - function activate() { - console.log(message); - } - } - } - - function activateDynamicObject() { - var o = {}; - if (which) { - which = false; - o = a.createObject(null); // no parent - } else { - which = true; - o = b.createObject(null); // no parent - } - o.activate(); - } - } -\endcode -*/ /*! \qmlbasictype date @@ -322,5 +191,3 @@ is automatically converted into a QRectF value. \sa{QML Basic Types} */ - - diff --git a/src/qml/doc/src/qtqml.qdoc b/src/qml/doc/src/qtqml.qdoc index 05a33f3..3cb6fce 100644 --- a/src/qml/doc/src/qtqml.qdoc +++ b/src/qml/doc/src/qtqml.qdoc @@ -30,159 +30,102 @@ \title Qt QML \brief The Qt QML module defines and implements the QML language -\section1 Overview of the Qt QML Module - -The Qt QML module provides a framework for developing applications and -libraries with the QML language. It defines and implements the language -and engine infrastructure, and provides an API to enable application +The Qt QML module provides a framework for developing applications and libraries +with the \l{The QML Language}{QML language}. It defines and implements the +language and engine infrastructure, and provides an API to enable application developers to extend the QML language with custom types and integrate QML code with JavaScript and C++. -The Qt QML module provides both the \c QtQml QML module, which supplies -\l{Qt QML QML Types}{a set of core QML types} for creating QML -applications, and the \c QtQml C++ module, which supplies \l{Qt QML C++ Classes}{a set of C++ -APIs} for extending QML applications with custom types and integrating C++ -implementations with QML applications. - -Note that the Qt QML module provides only the language and infrastructure -for the QML, and does not provide a visual canvas or rendering engine for -creating user interfaces. These are provided instead by the -\l{Qt Quick} module, which provides many visual components, -model/view support, an animation framework and much more for building user -interfaces with QML. +Note that while the Qt QML module provides the language and infrastructure +for QML applications, the \l{Qt Quick} module provides many visual components, +model-view support, an animation framework, and much more for building user +interfaces. For those new to QML and Qt Quick, please see \l{qtquick-applicationdevelopers.html}{QML Application Developer Resources} for an introduction to writing QML applications. +\section1 Getting Started -\section1 Qt QML Module Documentation +To include the definitions of the module's classes, use the +following directive: -\list - \li \l{qtqml-cppclasses-topic.html}{Important C++ Classes} - \list - \li \l{QQmlEngine} - \li \l{QQmlContext} - \li \l{QQmlComponent} - \li \l{QQmlExpression} - \endlist - - \li \l{qtqml-typesystem-topic.html}{The QML Type System} - \list - \li \l{qtqml-typesystem-basictypes.html}{Basic Types} - \li \l{qtqml-typesystem-topic.html#javascript-types}{JavaScript Types} - \li \l{qtqml-typesystem-objecttypes.html}{QML Object Types} - \list - \li \l{qtqml-documents-definetypes.html}{Defining Object Types from QML} - \li \l{qtqml-cppintegration-definetypes.html}{Defining Object Types from C++} - \endlist - \endlist - - \li \l{qtqml-modules-topic.html}{QML Modules} - \list - \li \l{qtqml-modules-qmldir.html}{Specifying A QML Module} - \li \l{qtqml-modules-topic.html#supported-qml-module-types}{Supported QML Module Types} - \list - \li \l{qtqml-modules-identifiedmodules.html}{Identified Modules} - \li \l{qtqml-modules-legacymodules.html}{Legacy Modules} - \endlist - \li \l{qtqml-modules-cppplugins.html}{Providing Types and Functionality in a C++ Plugin} - \endlist - - \li \l{qtqml-documents-topic.html}{QML Documents} - \list - \li \l{qtqml-documents-structure.html}{Structure of a QML Document} - \li \l{Syntax of the QML Language} - \li \l{qtqml-documents-definetypes.html}{Defining Object Types through QML Documents} - \list - \li \l{qtqml-documents-definetypes.html#defining-an-object-type-with-a-qml-file}{Defining an Object Type with a QML File} - \li \l{qtqml-documents-definetypes.html#accessible-attributes-of-custom-types}{Accessible Attributes of Custom Types} - \endlist - \li \l{qtqml-documents-networktransparency.html}{Resource Loading and Network Transparency} - \li \l{qtqml-documents-scope.html}{Scope and Naming Resolution} - \endlist - - \li \l{qtqml-typereference-topic.html}{QML Types Provided by the Qt QML Module} - \list - \li \l{qtqml-typereference-topic.html#importing-qtqml}{Importing \c QtQml} - \li \l{qtqml-typereference-topic.html#basic-types}{Basic Types} - \li \l{qtqml-typereference-topic.html#object-types}{Object Types} - \list - \li \l{qtqml-typereference-topic.html#qtobject}{QtObject} - \li \l{qtqml-typereference-topic.html#component}{Component} - \endlist - \endlist - - \li \l{qtqml-javascript-topic.html}{Integrating QML and JavaScript} - \list - \li \l{qtqml-javascript-expressions.html}{Using JavaScript Expressions with QML} - \li \l{qtqml-javascript-dynamicobjectcreation.html}{Dynamic QML Object Creation from JavaScript} - \li \l{qtqml-javascript-resources.html}{Defining JavaScript Resources In QML} - \li \l{qtqml-javascript-imports.html}{Importing JavaScript Resources In QML} - \li \l{qtqml-javascript-hostenvironment.html}{JavaScript Host Environment} - \list - \li \l{qtqml-javascript-hostenvironment.html#common-base}{Common Base} - \li \l{qtqml-javascript-hostenvironment.html#qml-global-object}{QML Global Object} - \li \l{qtqml-javascript-hostenvironment.html#javascript-objects-and-functions}{JavaScript Objects and Functions} - \li \l{qtqml-javascript-hostenvironment.html#javascript-environment-restrictions}{JavaScript Environment Restrictions} - \endlist - \endlist - - \li \l{qtqml-cppintegration-topic.html}{Integrating QML and C++} - \list - \li \l{qtqml-cppintegration-exposecppattributes.html}{Exposing Attributes of C++ Classes to QML} - \li \l{qtqml-cppintegration-definetypes.html}{Defining QML Types from C++} - \li \l{qtqml-cppintegration-contextproperties.html}{Embedding C++ Objects into QML with Context Properties} - \li \l{qtqml-cppintegration-interactqmlfromcpp.html}{Interacting with QML Objects from C++} - \li \l{qtqml-cppintegration-data.html}{Data Type Conversion Between QML and C++} - \endlist +\code +#include +\endcode -\endlist +The QML types in Qt QML are available through the \c QtQML import. To use the +types, add the following import statement to your .qml file: +\code +import QtQml 2.0 +\endcode + + +To link against the module, add this line to your \l qmake \c +.pro file: +\code +QT += qml +\endcode -\section1 Syntax of the QML Language +\section1 QML and QML Types +The Qt QML module contains the QML framework and important QML types used in +applications. The constructs of QML are described in the \l{The QML Reference}. + +In addition to the \l{QML Basic Types}, the module comes with +various QML object types: \list - \li \l{qtqml-syntax-basics.html}{QML Syntax Basics} - \list - \li \l{qtqml-syntax-imports.html}{Import Statements} - \li \l{qtqml-syntax-basics.html#object-declarations}{Object Declarations} - \list - \li \l{qtqml-syntax-basics.html#child-objects}{Child Objects} - \endlist - \li \l{qtqml-syntax-basics.html#comments}{Comments} - \endlist - - \li \l{qtqml-syntax-objectattributes.html}{QML Object Attributes} - \list - \li \l{qtqml-syntax-objectattributes.html#the-id-attribute}{The \e id Attribute} - \li \l{qtqml-syntax-objectattributes.html#property-attributes}{Property Attributes} - \li \l{qtqml-syntax-objectattributes.html#signal-attributes}{Signal Attributes} - \li \l{qtqml-syntax-objectattributes.html#method-attributes}{Method Attributes} - \li \l{qtqml-syntax-objectattributes.html#attached-properties-and-attached-signal-handlers}{Attached Properties and Attached Signal Handlers} - \endlist - - \li \l{qtqml-syntax-propertybinding.html}{Property Binding} - \li \l{qtqml-syntax-signals.html}{Signal and Handler Event System} +\li \l Component +\li \l QtObject +\li \l Binding +\li \l Connections +\li \l Timer \endlist -\section1 Reference Documentation +\section1 JavaScript Environment for QML Applications + +JavaScript expressions allow QML code to contain application logic. Qt QML +provides the framework for running JavaScript expressions in QML and from C++. + +These sections are from \l{The QML Reference}. +\l{qtqml-javascript-topic.html}{Integrating QML and JavaScript} + \list + \li \l{qtqml-javascript-expressions.html}{Using JavaScript Expressions with QML} + \li \l{qtqml-javascript-dynamicobjectcreation.html}{Dynamic QML Object Creation from JavaScript} + \li \l{qtqml-javascript-resources.html}{Defining JavaScript Resources In QML} + \li \l{qtqml-javascript-imports.html}{Importing JavaScript Resources In QML} + \li \l{qtqml-javascript-hostenvironment.html}{JavaScript Host Environment} + \endlist + +\section1 Integrating QML with C++ Applications + +The module also provides the framework for running QML applications. +The QML framework allows QML code to contain JavaScript expressions and for +the QML code to interact with C++ code. -Additional Qt QML information: \list -\li \l{Qt QML C++ Classes} - the C++ API provided by the - Qt QML module -\li \l{Qt QML Release Notes} - list of changes and - additions in the Qt QML module +\li \l{Important C++ Classes Provided By The Qt QML Module} +\li \l{Integrating QML and C++} \endlist +\section1 Guides and Other Information + Further information for writing QML applications: \list +\li \l{The QML Reference} \li \l{QML Application Developer Resources} - essential information for application development with QML and Qt Quick -\li \l{Qt Quick} - documentation for the Qt Quick module, which provides a - visual canvas, an animation framework, model/view components and more for - building fluid user interfaces and applications with QML +\li \l{Qt Quick} - a module which provides a set of QML types and C++ classes + for building user interfaces and applications with QML +\li \l{Qt QML Release Notes} - list of changes and + additions in the Qt QML module \endlist -*/ +\section2 Reference +\list +\li \l{Qt QML C++ Classes}{C++ Classes} +\li \l{Qt QML QML Types}{QML Types} +\endlist + +*/ -- 2.7.4