ada10
4th October 2010, 10:42
I have a custom metatype declared as shown below -
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 setPixmap( QPixmap aPixmap );
void setFilePath( QString aPmapFilePath );
QPixmap getPmap();
QString getPmapFilePath();
private:
QPixmap mMypixmap;
QString mPixmapFilePath;
};
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 ?
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 setPixmap( QPixmap aPixmap );
void setFilePath( QString aPmapFilePath );
QPixmap getPmap();
QString getPmapFilePath();
private:
QPixmap mMypixmap;
QString mPixmapFilePath;
};
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 ?