diff --git a/share/qtcreator/templates/wizards/qtcreatorplugin/myplugin.h b/share/qtcreator/templates/wizards/qtcreatorplugin/myplugin.h
index 92eaa9d3e8f8fd169d0e60d48e0afcbe7f9cd55e..97aebfb6194626afffae0774e1461caafd255f35 100644
--- a/share/qtcreator/templates/wizards/qtcreatorplugin/myplugin.h
+++ b/share/qtcreator/templates/wizards/qtcreatorplugin/myplugin.h
@@ -8,9 +8,10 @@
 namespace %PluginName% {
 namespace Internal {
 
-class %PluginName%Plugin : public ExtensionSystem::IPlugin
+class %PluginName:u%SHARED_EXPORT %PluginName%Plugin : public ExtensionSystem::IPlugin
 {
     Q_OBJECT
+    Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QtCreatorPlugin" FILE "%PluginName%.json")
 
 public:
     %PluginName%Plugin();