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:
Qt Code:
  1. if(item->type() == pixmapItem::Type)
  2. qgraphicsitem_cast<pixmapItem *>(item);
To copy to clipboard, switch view to plain text mode 

I add to pixmapitem.h file:
Qt Code:
  1. public:
  2. enum { Type = UserType + 2 };
  3. int type() const{return Type;}
To copy to clipboard, switch view to plain text mode 

What's wrong???