title: How to get notifications from QGraphicsScene on addItem or itemChange?
body: <p>In my project I'm using a <code>QGraphicsScene</code> and adding / removing items all over the code.</p>
  
  <p>Now I want to get notified whenever a <code>QGraphicsItem</code> gets added or removed. Many Qt classes have notification signals or at least virtual functions that get called on such changes. I'm trying to avoid adding many rows of code in many places which is not only cumbersome but also unsafe (forgetting an insert / removal now or in the future).</p>
  
  <p>I need a solution that works with any <code>QGraphicsItem</code>.</p>
  
  <p>This is a list of things that do not work:</p>
  
  <ul>
  <li>connect to a signal of <code>QGraphicsScene</code> <sup>(as in <code>QAbstractItemModel::rowsInserted()</code>)</sup> -> there is none.</li>
  <li>inherit from <code>QGraphicsScene</code> and overload a virtual notifier function <sup>(as in <code>QTabWidget::tabInserted()</code>)</sup> -> there is none.</li>
  <li>inherit and overload <code>addItem()</code>, sending notifications myself <sup>(as in <code>QMdiArea::addSubWindow()</code>)</sup> -> <code>addItem</code> isn't virtual and gets called from the constructors of <code>QGraphicsItems</code>.</li>
  <li>install event filters on newly added <code>QGraphicsItems</code> -> no idea how to get the newly added item AND it would be a <code>sceneEventFilter</code> which can only be installed on other <code>QGraphicsItems</code>.</li>
  <li>connect to <code>itemChange()</code> of <code>QGraphicsItem</code> -> <code>itemChange</code> is not a signal AND overloading <code>QGraphicsItem</code> is not an option.</li>
  <li>wrap <code>QGraphicsScene</code> (having the scene as a private member) and only expose functions <code>addItem</code> and <code>removeItem</code> -> but <code>QGraphicsItems</code> in that scene could still access it via <code>scene()</code> function, so this solution is not safe enough.</li>
  </ul>
  
  <p><strong>How can I get notifications on item changes?</strong></p>
  
  <p>If there is an easy way that I simply missed, please point me to it. Else, I'd appreciate ideas on this very much.</p>