title: QT 5 add a custom widget inherited from QGraphicsView to designer
body: <p>I have a custom widget from modified elastic nodes example. It inherits from QGraphicsView. In the example it is set as a central widget in the main window, so nothing can be added. Here's the code for main from the example:</p>
  
  <pre><code>#include "graphwidget.h"
  
  #include &lt;QApplication&gt;
  #include &lt;QTime&gt;
  #include "mainwindow.h"
  
  int main(int argc, char **argv)
  {
      QApplication app(argc, argv);
      qsrand(QTime(0,0,0).secsTo(QTime::currentTime()));
  
      GraphWidget *widget = new GraphWidget;
  
      QMainWindow window;
      window.setCentralWidget(widget);
  
      window.show();
      return app.exec();
  }
  </code></pre>
  
  <p>I want to add the widget to the ui form, so that i can add some buttons and input. How can i do that? </p>