qgraphicsitem_cast problem
After compiling the code, i have this 3 error:
moc_pixmapitem.cpp:40: error: ‘staticMetaObject’ is not a member of ‘QGraphicsPixmapItem’
moc_pixmapitem.cpp:54: error: ‘qt_metacast’ is not a member of ‘QGraphicsPixmapItem’
moc_pixmapitem.cpp:59: error: ‘qt_metacall’ is not a member of ‘QGraphicsPixmapItem’
I have this error, when i inserted this line of code in my MainWIndow application:
Code:
if(item->type() == pixmapItem::Type)
qgraphicsitem_cast<pixmapItem *>(item);
I add to pixmapitem.h file:
Code:
public:
enum { Type = UserType + 2 };
int type() const{return Type;}
What's wrong???
Re: qgraphicsitem_cast problem
I had a public slot function in pixmapItem class.....so i put this function in a public section(without slot) and so resolve the problem............:D