title: clear widget in a QGraphicsScene : crash
body: <p>I have a QGraphicsScene with a QPushButton inside, and clearing this scene will crash my application. Is there a correct way to clear a scene with a QWidget ?</p>
  
  <p>The following code crashes when clicking on the button:</p>
  
  <pre><code>#include &lt;QApplication&gt;
  #include &lt;QGraphicsView&gt;
  #include &lt;QGraphicsScene&gt;
  #include &lt;QGraphicsProxyWidget&gt;
  #include &lt;QPushButton&gt;
  
  int main(int argc, char *argv[]) {
      QApplication app(argc, argv);
  
      QGraphicsScene *scene = new QGraphicsScene();
  
      QGraphicsView *view = new QGraphicsView();
      view-&gt;setScene(scene);
      view-&gt;show();
  
      QPushButton *button = new QPushButton("button");
      QObject::connect(button, SIGNAL(clicked()), scene, SLOT(clear()));
  
      QGraphicsProxyWidget *proxy = scene-&gt;addWidget(button);
  
      return app.exec();
  }
  </code></pre>