title: How to use QGraphicsScene with QtGui/QGuiApplication?
body: <p>I created a new Qt 5 project with QtCreator, and added the following lines to it.</p>
  
  <p><code>#include &lt;QGraphicsScene&gt;</code></p>
  
  <p>// in main():<br>
  <code>QGraphicsScene scene;</code></p>
  
  <p>In the .pro file I added:<br>
   <code>Qt += gui</code></p>
  
  <p>The object creation of <code>QGraphicsScene</code> is resulting in the segmentation fault.
  What point am I missing?</p>
  
  <p>EDIT:</p>
  
  <hr>
  
  <p>I realized now that instead of <code>QApplication</code> my rest of the program is using <code>QtGui/QGuiApplication</code>.</p>
  
  <p>How to use QGraphicsScene with QtGui/QGuiApplication?</p>