QT中重写QGraphicsItem类,编译出现错误
最近重写QGraphicsItem类时,编译时出现如下警告:warning : Class PolygonItem implements the interface QGraphicsItem but does not list it in Q_INTERFACES. qobject_cast to QGraphicsItem will not work!解决方法:1. 保证继承的类...