5 QObject *ANewExtensionFactory::createExtension(QObject *object,
6 const QString &iid, QObject *parent)
const
8 if (iid != Q_TYPEID(QDesignerContainerExtension))
11 if (
auto *widget = qobject_cast<MyCustomWidget*>(object))
12 return new MyContainerExtension(widget, parent);
20 QObject *AGeneralExtensionFactory::createExtension(QObject *object,
21 const QString &iid, QObject *parent)
const
23 auto *widget = qobject_cast<MyCustomWidget*>(object);
27 if (iid == Q_TYPEID(QDesignerTaskMenuExtension))
28 return new MyTaskMenuExtension(widget, parent);
30 if (iid == Q_TYPEID(QDesignerContainerExtension))
31 return new MyContainerExtension(widget, parent);