ksrarc
4th December 2008, 03:30
Hello, I have this problem.
I define an typedef of qreal as Real and make it available to QVariant with Q_DECLARE_METATYPE in an include file, lets say "typedefs.h"
Then create an abstract interface with:
Q_PROPERTY( Real nextReal READ nextReal )
Define then the Subclass and implement "nextReal" method. Create a plugin that create the subclass.
In the main.cpp of the application load the plugin, create a Subclass object and read the property using QObject::property and get this message:
QMetaProperty::read: Unable to handle unregistered datatype 'Real' for property 'AbstractInterface::nextReal'
but if it is readed with nextReal method works fine.
in both files main.cpp and AbstractInterface.h include typedefs.h
I need to use the QObject interface not the Abstract interface, how can I solve this?
I define an typedef of qreal as Real and make it available to QVariant with Q_DECLARE_METATYPE in an include file, lets say "typedefs.h"
Then create an abstract interface with:
Q_PROPERTY( Real nextReal READ nextReal )
Define then the Subclass and implement "nextReal" method. Create a plugin that create the subclass.
In the main.cpp of the application load the plugin, create a Subclass object and read the property using QObject::property and get this message:
QMetaProperty::read: Unable to handle unregistered datatype 'Real' for property 'AbstractInterface::nextReal'
but if it is readed with nextReal method works fine.
in both files main.cpp and AbstractInterface.h include typedefs.h
I need to use the QObject interface not the Abstract interface, how can I solve this?