aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlextensionplugin.cpp
diff options
context:
space:
mode:
authorJerome Pasion <jerome.pasion@digia.com>2013-05-13 13:11:05 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-05-15 09:32:58 +0200
commitec57778b5d500bb12cc4ec678745f764a33f129d (patch)
tree1557fc56973d4f47b870f4aeed4301254b35628d /src/qml/qml/qqmlextensionplugin.cpp
parentebbb0257e65b762ac6c3cf2baa19bbb5d581d071 (diff)
Doc: Fixed a bunch of missing snippets.
-moved delegate model related snippets from Qt Quick to Qt QML. -corrected snippet paths Change-Id: If688f97fb9317def16f343d5502a6a54d6761e95 Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlextensionplugin.cpp')
-rw-r--r--src/qml/qml/qqmlextensionplugin.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qml/qml/qqmlextensionplugin.cpp b/src/qml/qml/qqmlextensionplugin.cpp
index b87c16cd94..f77b176404 100644
--- a/src/qml/qml/qqmlextensionplugin.cpp
+++ b/src/qml/qml/qqmlextensionplugin.cpp
@@ -57,7 +57,7 @@ QT_BEGIN_NAMESPACE
These extensions allow custom QML types to be made available to the QML engine.
To write a QML extension plugin:
-
+
\list
\li Subclass QQmlExtensionPlugin, implement registerTypes() method to register types
using qmlRegisterType(), and export the class using the Q_PLUGIN_METADATA() macro
@@ -77,7 +77,7 @@ QT_BEGIN_NAMESPACE
as a new QML element. It provides the current time through \c hour and \c minute
properties, like this:
- \snippet qml/plugins/plugin.cpp 0
+ \snippet plugins/plugin.cpp 0
\dots
To make this class available as a QML type, create a plugin that registers
@@ -85,7 +85,7 @@ QT_BEGIN_NAMESPACE
module will be named \c TimeExample (as defined in the project
file further below).
- \snippet qml/plugins/plugin.cpp plugin
+ \snippet plugins/plugin.cpp plugin
This registers the \c TimeModel class with the 1.0 version of this
plugin library, as a QML type called \c Time. The Q_ASSERT statement
@@ -109,12 +109,12 @@ QT_BEGIN_NAMESPACE
should be bundled with the plugin, so it needs to be specified in the \c qmldir
file:
- \quotefile qml/plugins/imports/TimeExample/qmldir
+ \quotefile plugins/imports/TimeExample/qmldir
Once the project is built and installed, the new \c Time element can be
used by any QML component that imports the \c TimeExample module:
- \snippet qml/plugins/plugins.qml 0
+ \snippet plugins/plugins.qml 0
The full source code is available in the \l {qml/plugins}{plugins example}.