diff options
Diffstat (limited to 'src/qml/qml/qqmlextensionplugin.cpp')
-rw-r--r-- | src/qml/qml/qqmlextensionplugin.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qml/qml/qqmlextensionplugin.cpp b/src/qml/qml/qqmlextensionplugin.cpp index 76de2dfe34..f3d1ba9d41 100644 --- a/src/qml/qml/qqmlextensionplugin.cpp +++ b/src/qml/qml/qqmlextensionplugin.cpp @@ -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 plugins/plugin.cpp 0 + \snippet qmlextensionplugins/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 plugins/plugin.cpp plugin + \snippet qmlextensionplugins/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,14 +109,14 @@ QT_BEGIN_NAMESPACE should be bundled with the plugin, so it needs to be specified in the \c qmldir file: - \quotefile plugins/imports/TimeExample/qmldir + \quotefile qmlextensionplugins/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 plugins/plugins.qml 0 + \snippet qmlextensionplugins/plugins.qml 0 - The full source code is available in the \l {qml/plugins}{plugins example}. + The full source code is available in the \l {qml/qmlextensionplugins}{plugins example}. The \l {Writing QML Extensions with C++} tutorial also contains a chapter on creating QML plugins. |