Originally Posted by
Maluko_Da_Tola
The compiler does not accept the method painter->drawEllipse(-10, -20, 20, 40); saying that there is an "unexpected `(' token". Any suggestions on why this is happening?
It's like the compiler says to you: Your syntax is wrong! Basic C++...
{
painter->drawEllipse(-10, -20, 20, 40);
painter->drawEllipse(-10, -20, 20, 40);
}
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option,QWidget *widget)
{
painter->drawEllipse(-10, -20, 20, 40);
painter->drawEllipse(-10, -20, 20, 40);
}
To copy to clipboard, switch view to plain text mode
..And you probably need to include the header for QPainter.
Bookmarks