1

I have been trying to find a way to fill an instance of QGraphicsRectItem with any color, let's say red color, but I failed to find a clear way as of how to accomplish this naive task, It would be great if you could provide some hints, links, etc.

Thanks a lot

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
mansanto
  • 360
  • 4
  • 16

1 Answers1

5

You have to use setBrush():

your_rect_item->setBrush(Qt::red)
eyllanesc
  • 235,170
  • 19
  • 170
  • 241