aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc/src/bindings/qmlbindings.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/doc/src/bindings/qmlbindings.qdoc')
-rw-r--r--src/qml/doc/src/bindings/qmlbindings.qdoc70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/qml/doc/src/bindings/qmlbindings.qdoc b/src/qml/doc/src/bindings/qmlbindings.qdoc
new file mode 100644
index 0000000000..b2adb3a6d4
--- /dev/null
+++ b/src/qml/doc/src/bindings/qmlbindings.qdoc
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: http://www.qt-project.org/
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** GNU Free Documentation License
+** 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.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms
+** and conditions contained in a signed written agreement between you
+** and Nokia.
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qml-plugin.html
+\title QML Plugins and C++ Binding
+\brief Provides an engine for running QML code
+
+To add functionality that is beyond QML and modules, C++ types are registered to
+the runtime as plugins. For example, to add a full network manager into
+QML, classes that utilize Qt Network classes may be registered into the runtime
+and loaded as a QML type.
+
+Additional C++ types are also available in applications through this mechanism.
+
+\section1 C++ Types as QML Types
+
+The QML engine can instantiate any Qt C++ construct such as properties,
+functions, and data models into the QML context allowing the constructs to be
+accessible from within QML.
+
+ \list
+ \li \l{C++ Types as QML Types}
+ \li \l{C++ Properties, Methods, and Signals in QML}
+ \endlist
+
+\section1 Registering a Plugin
+The QML engine can run Qt C++ applications by registering types into the runtime
+and by loading C++ code as plugins. Plugins are imported and labeled as modules
+and its content are available as types.
+
+ To write a QML extension plugin:
+ \list 1
+ \li Subclass QDeclarativeExtensionPlugin
+ \li Implement QDeclarativeExtensionPlugin's registerTypes() method
+ \li Register types with qmlRegisterType()
+ \li Export the class using the Q_EXPORT_PLUGIN2() macro
+ \li Write a project file for the plugin
+ \li Add the files to the project
+ \endlist
+
+ The QML Plugins page details the process using example code.
+ \list
+ \li \l{QML Plugins}
+ \endlist
+*/