Question: qml how to use plugin?
Answer: Subclass QQmlEngineExtensionPlugin and use the Q_PLUGIN_METADATA() macro to register the plugin with the Qt meta object system. Use the QML_ELEMENT and QML_NAMED_ELEMENT() macros to declare QML types. Write a project file for the plugin. Add: ...  Create a qmldir file to describe the plugin.