был:
#ifndef CHUMAN_H
#define CHUMAN_H
#include <QGraphicsPixmapItem>
#include <QGraphicsScene>
class CHuman : public QGraphicsPixmapItem
{
public:
CHuman(QGraphicsScene* scene)
{
...
}
...
~CHuman ();
QGraphicsPixmapItem* bullet;
private:
QGraphicsPixmapItem *human;
};
#endif // CHUMAN_H
стал:
#ifndef CHUMAN_H
#define CHUMAN_H
#include <QGraphicsPixmapItem>
#include <QGraphicsScene>
class CHuman : public QGraphicsPixmapItem
{
Q_OBJECT
public:
CHuman(QGraphicsScene* scene)
{
....
}
~CHuman ();
QGraphicsPixmapItem* bullet;
public slots:
void CShootBullet();
private:
...
};
#endif // CHUMAN_H
и поехали:
moc_chuman.cpp:44: error: 'staticMetaObject' is not a member of 'QGraphicsPixmapItem'
/Library/Frameworks/QtCore.framework/Headers/qobject.h: In member function 'virtual const QMetaObject* CHuman::metaObject() const':
/Library/Frameworks/QtCore.framework/Headers/qobject.h:296: error: 'QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> > QObject::d_ptr' is protected
moc_chuman.cpp:54: error: within this context
/Library/Frameworks/QtCore.framework/Headers/qobject.h:296: error: object missing in reference to 'QObject::d_ptr'
moc_chuman.cpp:54: error: from this location
/Library/Frameworks/QtCore.framework/Headers/qobject.h:296: error: 'QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData> > QObject::d_ptr' is protected
moc_chuman.cpp:54: error: within this context
/Library/Frameworks/QtCore.framework/Headers/qobject.h:296: error: object missing in reference to 'QObject::d_ptr'
moc_chuman.cpp:54: error: from this location
moc_chuman.cpp: In member function 'virtual void* CHuman::qt_metacast(const char*)':
moc_chuman.cpp:62: error: 'qt_metacast' is not a member of 'QGraphicsPixmapItem'
moc_chuman.cpp: In member function 'virtual int CHuman::qt_metacall(QMetaObject::Call, int, void**)':
moc_chuman.cpp:67: error: 'qt_metacall' is not a member of 'QGraphicsPixmapItem'
make: *** [moc_chuman.o] Error 1