what' the deference between QQmlEngineExtensionPlugin and QQmlExtensionPlugin
-
In qt6book-with-frontpage.pdf,
page652,Extending QML with C++,talking about QQmlExtensionPlugin.

but page655, Creating the plugin, using QQmlEngineExtensionPlugin to create a qmlplugin.

In fact,When I created a plugin by the wizard of QtQuick 2 QML ExtensionPlugin, the interface was QQmlExtensionPlugin.why? what‘s the diferece.
-
In qt6book-with-frontpage.pdf,
page652,Extending QML with C++,talking about QQmlExtensionPlugin.

but page655, Creating the plugin, using QQmlEngineExtensionPlugin to create a qmlplugin.

In fact,When I created a plugin by the wizard of QtQuick 2 QML ExtensionPlugin, the interface was QQmlExtensionPlugin.why? what‘s the diferece.
@cq_qt said in what' the deference between QQmlEngineExtensionPlugin and QQmlExtensionPlugin:
what‘s the diferece.
QQmlExtensionPlugin is older, QQmlEngineExtensionPlugin is the new replacement. The Qt engineers haven't yet added documentation on how to port from the old class to the new class, but they are planning to do that soon (see https://bugreports.qt.io/browse/QTBUG-95448 )
If you are creating a new project, you don't actually need to write the QQmlEngineExtensionPlugin code yourself. CMake does it automatically for you now. See the note at https://doc-snapshots.qt.io/qt6-dev/qqmlengineextensionplugin.html#details