QMetaType::metaObjectForType returns NULL
-
Hi;
QMetaType::metaObjectForType(QMetaType::type("IChRSMSession*")) returns NULL.
IChRSMSession is interface that defined in DLL/Library as above;
class IChRSMSession
{
Q_GADGET
..
};QT_BEGIN_NAMESPACE
#define IChRSMSession_IID "com.motiontrue.plugins.IChRSMSession"
Q_DECLARE_INTERFACE(IChRSMSession, IChRSMSession_IID)
QT_END_NAMESPACE
Q_DECLARE_METATYPE(IChRSMSession*)
-
Hi;
QMetaType::metaObjectForType(QMetaType::type("IChRSMSession*")) returns NULL.
IChRSMSession is interface that defined in DLL/Library as above;
class IChRSMSession
{
Q_GADGET
..
};QT_BEGIN_NAMESPACE
#define IChRSMSession_IID "com.motiontrue.plugins.IChRSMSession"
Q_DECLARE_INTERFACE(IChRSMSession, IChRSMSession_IID)
QT_END_NAMESPACE
Q_DECLARE_METATYPE(IChRSMSession*)
@VeNToR Did you register it using http://doc.qt.io/qt-5/qmetatype.html#qRegisterMetaType ?
-
@VeNToR Did you register it using http://doc.qt.io/qt-5/qmetatype.html#qRegisterMetaType ?
-
Hi,
Because there are none. A
Q_GADGETis not a QObject based class. You only have the staticMetaObject like describe in the macro documentation. -
Hi;
QMetaType::metaObjectForType(QMetaType::type("IChRSMSession*")) returns NULL.
IChRSMSession is interface that defined in DLL/Library as above;
class IChRSMSession
{
Q_GADGET
..
};QT_BEGIN_NAMESPACE
#define IChRSMSession_IID "com.motiontrue.plugins.IChRSMSession"
Q_DECLARE_INTERFACE(IChRSMSession, IChRSMSession_IID)
QT_END_NAMESPACE
Q_DECLARE_METATYPE(IChRSMSession*)
-
How did you do that ?