Hi Qt community,
I have to add on my ui form some custom widgets (i.e. myLineEdit, myPushButton, myLabel, etc) to perform some specific operations.

I read that this can be done by just dragging on the form some qt widget (e.g. a QLabel or a QLineEdit) and then promote it by selecting the *.h of the custom widget I would use.

Now I am a bit confused because in the Qt doc it says that this is done by using Qt plugins, so i created many plugins, one for each custom I should use. I also read that for each plugin you have to declare the metadata through the macro

Q_PLUGIN_METADATA(IID "some metadata")
So I set it and got the error:

multiple definition of `qt_plugin_query_metadata`
So seems that is not possible to create a single project ( single pro file ) containing many plugins.

Can I have a help in better understanding the scenario? It is mandatory to use plugins to create some custom widget in the form?

Thank you very much,
Franco