Problem in compilation with custom metatype
I have a custom metatype declared as shown below -
Code:
class thumbnaildata
: public QObject{
Q_OBJECT
public:
thumbnaildata(); //default ctor
thumbnaildata
( QPixmap aPixmap,
QString aPmapFilePath
);
//ctor with parameters thumbnaildata( const thumbnaildata& other ); //mandatory copy ctor
~thumbnaildata();
void setFilePath
( QString aPmapFilePath
);
private:
};
Q_DECLARE_METATYPE( thumbnaildata )
When I compile this definition & use it in a model class ( compatible with QVariant ), I am getting the following error -
" Error: #145: member "thumbnaildata::staticMetaObject" may not be initialized
const QMetaObject thumbnaildata::staticMetaObject = { "
What is the issue & has anyone faced this issue before ?
Re: Problem in compilation with custom metatype
Please show us the line which cause that error.