November 2018
Intermediate to advanced
1150 pages
24h 11m
English
The FilterWidget class is completed and ready to be used. We now have to register FilterWidget with the Qt Designer plugin system. This glue code is made using a child class of QDesignerCustomWidgetInterface.
Create a new C++ class named FilterPluginDesigner and update FilterPluginDesigner.h like so:
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
class FilterPluginDesigner : public QObject, public QDesignerCustomWidgetInterface
{
Q_OBJECT
Q_PLUGIN_METADATA(IID
"org.masteringqt.imagefilter.FilterWidgetPluginInterface")
Q_INTERFACES(QDesignerCustomWidgetInterface)
public:
FilterPluginDesigner(QObject* parent = 0);
};
The FilterPlugin class inherits from two classes:
Read now
Unlock full access