Hi, I'm trying to build an existing Qt4 project with Qt5. After several problems with changed headers and renamed functions my source files compile, but the moc_xxx.cpp files generate errors:
1>c:\qt\5.0.0\5.0.0\msvc2010\include\QtCore/qmetatype.h(642): error C2338: Type is not registered, please use the Q_DECLARE_METATYPE macro to make it known to Qt's meta-object system
1> c:\qt\5.0.0\5.0.0\msvc2010\include\QtCore/qmetatype.h(656): Siehe Verweis auf die Instanziierung der gerade kompilierten Funktions-template "int qMetaTypeId<T>(T *)".
1> with
1> [
1> T=QVector<QPointF> *
1> ]
1>c:\qt\5.0.0\5.0.0\msvc2010\include\QtCore/qmetatype.h(642): error C2338: Type is not registered, please use the Q_DECLARE_METATYPE macro to make it known to Qt's meta-object system
1> c:\qt\5.0.0\5.0.0\msvc2010\include\QtCore/qmetatype.h(656): Siehe Verweis auf die Instanziierung der gerade kompilierten Funktions-template "int qMetaTypeId<T>(T *)".
1> with
1> [
1> T=QVector<QPointF> *
1> ]
To copy to clipboard, switch view to plain text mode
The german message in the middle means something like "see reference to instantiation of the just compiled function template".
I have a slot that takes QVector<QPointF>* as a parameter (among others), and it worked without problems in Qt4. I tried to use various combinations of QVector and QPointF with Q_DECLARE_METATYPE, but the error still exists. I'm using VisualStudio 2010 Express.
Ginsengelf
Bookmarks