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!
QGraphicsScene :: itemAt()将在给定位置返回该项目。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.