August 2018
Intermediate to advanced
534 pages
11h 21m
English
The FilterWidget class is completed and ready to be used. We now have to register the FilterWidget class 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 as shown in the following code:
#include <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