the only syntax error i can find is the missing parenthesis that enclose the method 'paint'. However, the compiler still display the same error (i.e. that the '' painter->drawEllipse(-10, -20, 20, 40);'' has an unexpected `(' token)!
I have now the following code:

#ifndef WIERDO_H
#define WIERDO_H

#include <QGraphicsItem>

class Wierdo : public QGraphicsItem
{

public:
QRectF boundingRect() const { return QRectF(0, 0,100, 100);};

QPainterPath shape() const{
QPainterPath path;
path.addRect(-10, -20, 20, 40);
return path;
};

void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,QWidget *widget);
{
painter->drawEllipse(-10, -20, 20, 40);
painter->drawEllipse(-10, -20, 20, 40);
};

};

#endif // WIERDO_H


The syntax I used for ''painter->drawEllipse(-10, -20, 20, 40);'' was taken from the colliding mice example. Any suggestions on why this is happening?

Thank you