In Interface.h file:
#include QtDesigner
#include "PushButtonPlugin.h"
#include "AnimatedLabelPlugin.h"
#include "LabelPlugin.h"
#include "TextEntryPlugin.h"
//Interface for all Widgets
class MyCustomWidgets: public QObject, public QDesignerCustomWidgetCollectionInterface
{
Q_OBJECT
Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
public:
MyCustomWidgets(QObject *parent = 0) : QObject(parent)
{
widgets.append(new PushButtonPlugin(this));
widgets.append(new AnimatedLabelPlugin(this));
widgets.append(new LabelPlugin(this));
widgets.append(new TextEntryPlugin(this));
}
virtual QList
{
return widgets;
}
private:
QList
};
In Interface.cpp file:
#include "Interface.h"
Q_EXPORT_PLUGIN2(customwidgetsplugin,MyCustomWidgets);