diff options
Diffstat (limited to 'src/qml/qml/qqmlextensionplugin.cpp')
-rw-r--r-- | src/qml/qml/qqmlextensionplugin.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlextensionplugin.cpp b/src/qml/qml/qqmlextensionplugin.cpp index 319accb768..5af51769ab 100644 --- a/src/qml/qml/qqmlextensionplugin.cpp +++ b/src/qml/qml/qqmlextensionplugin.cpp @@ -42,8 +42,8 @@ QT_BEGIN_NAMESPACE \fn void QQmlExtensionPlugin::registerTypes(const char *uri) Registers the QML types in the given \a uri. Subclasses should implement - this to call qmlRegisterType() for all types which are provided by the extension - plugin. + this to call \l {QQmlEngine::}{qmlRegisterType()} for all types which are + provided by the extension plugin. The \a uri is an identifier for the plugin generated by the QML engine based on the name and path of the extension's plugin library. @@ -166,8 +166,20 @@ void QQmlEngineExtensionPlugin::initializeEngine(QQmlEngine *engine, const char \since 6.2 \relates QQmlEngineExtensionPlugin - Ensures the plugin whose metadata-declaring class is named \a PluginName - is linked into static builds. + Ensures the plugin whose metadata-declaring plugin extension class is named + \a PluginName is linked into static builds. For the modules created using + \l qt_add_qml_module, the default plugin extension class name is computed + from the QML module URI by replacing dots with underscores, unless the + \c CLASS_NAME argument is specified. + + For example: + \badcode + qt_add_qml_module(myplugin + # The plugin extension class name in this case is my_Company_QmlComponents. + URI my.Company.QmlComponents + ... + ) + \endcode \sa Q_IMPORT_PLUGIN */ |