How to fill a QGraphicsRecItem with color
error: class QGraphicsItem has no member named "setBrush"
ok, which member function can fill color.
QGraphicsItem *ball = new QGraphicsRectItem(0, 0, 20, 20);
QTimeLine *timer = new QTimeLine(5000); timer->setFrameRange(0, 100);
The header file has been included
Yeah sorry... QGraphicsItem does not know setBrush. You need a QGraphicsRectItem for using setBrush.
Wrong cast in line 3...