in the documentation there's a sample that inherits both QObject and QGraphicsItem. Deoesn't QGraphicsItem inherits QObject? I looked at the Qt Assistant but it doesn't give info about that.

Qt Code:
  1. class Mouse : public QObject, public QGraphicsItem
  2. {
  3. Q_OBJECT
  4.  
  5. public:
  6. Mouse();
  7.  
  8. QRectF boundingRect() const;
  9. QPainterPath shape() const;
  10. void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,
  11. QWidget *widget);
  12.  
  13. protected:
  14. void timerEvent(QTimerEvent *event);
  15.  
  16. private:
  17. qreal angle;
  18. qreal speed;
  19. qreal mouseEyeDirection;
  20. QColor color;
  21. };
To copy to clipboard, switch view to plain text mode