0

I drew some rectangles on a graphics view in qt creator. Now I want to get a rectangle to change its color and something else by its known position. Is it possible? I don't want to use for loop to check every rectangle's position. Is there an easy way? Thank you in the advanced!

lancellx
  • 285
  • 1
  • 5
  • 15

1 Answers1

1

QGraphicsScene::itemAt() will return the item at the given location.

Chris
  • 17,119
  • 5
  • 57
  • 60