This doesnt work:
class Player
: public QObject,
public QGraphicspolygonitem
class Player : public QObject, public QGraphicspolygonitem
To copy to clipboard, switch view to plain text mode
https://doc.qt.io/qt-5/moc.html
Multiple Inheritance Requires QObject to Be First
If you are using multiple inheritance, moc assumes that the first inherited class is a subclass of QObject. Also,
be sure that only the first inherited class is a QObject.
so just do
class Player : public QGraphicspolygonitem
class Player : public QGraphicspolygonitem
To copy to clipboard, switch view to plain text mode
as Qgraphicspolygonitem already inherits qobject.
Bookmarks