I am trying to declare my class as a meta tag for Qt, but figuring out some problems. It seems like after declaring MetaType, he wants to access the copy constructor or something like that, which is not explicitly allowed for QObjects, as I thought.
This is my headline:
#include <QtCore/QObject>
#include <QtCore/QMetaType>
class Message : private QObject
{
Q_OBJECT
public:
Message();
int sourceId;
int targetId;
private:
Q_DISABLE_COPY(Message)
};
Q_DECLARE_METATYPE(Message)
Q_DECLARE_METATYPE(Message*)
Message::Message() :
QObject()
{
}
So, I get the following errors:
Message :: Message: it is not possible to access the private member declared in the class. Message see Link to function template instance 'void * compiled qMetaTypeConstructHelper (const T *)'
and a few more, but I think they are almost the same because of the same problem.
Does anyone know what I'm doing wrong?