There will be costly to inherit from QObject as there are thousand of QGraphicsItem.

I just need a macro so I can get class info, such as

Qt Code:
  1. class MyGraphicsItem : public QGraphicsItem
  2. {
  3. TYPE_INFO( MyGraphicsItem )
  4. ...
  5. }
To copy to clipboard, switch view to plain text mode 

But I don't know how to write such macro...