title: PyQt pyqtgraph in QGraphicsview
body: <p>I try to put a plot with pygtgraph in a QGraphicsView but that not really fonction well. I do like this:</p>
  <pre><code>self.plotWdgt= pg.PlotWidget(self.graphicsView)</code></pre>
  <p>And for plot:</p>
  <pre><code>self.plotWdgt.plot(x, y)</code></pre>
  <p>The problem is: I know that the plot is in the QGraphicsView because I see a little part of the graph on the top left of the graphicsView but I can not see it totally (see on the link below). I would like to center it in the QGraphicsView and make it fit with it.</p>
  <p>Result that I get</p>
  <p><img src="https://i.stack.imgur.com/sdZN2.png" alt="" /></p>
  <p><strong>EDIT</strong></p>
  <p>simple reproductible example:</p>
  <pre><code>import sys
  import pyqtgraph as pg
  from PyQt5.QtWidgets import QMainWindow, QApplication
  from PyQt5 import uic
  
  
  class MainWindow(QMainWindow):
      def __init__(self, *args, **kwargs):
          super(MainWindow, self).__init__(*args, **kwargs)
          uic.loadUi('test.ui', self)
          self.plotWdgt= pg.PlotWidget(self.graphicsView)
          data = [1,2,3,4,5,6,7,8,9,10]
          self.plotWdgt.plot(data)
          
           
  if __name__ == "__main__":
      app = QApplication(sys.argv)
      window = MainWindow()
      window.show()
      app.exec_()</code></pre>
  <p>form:</p>
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;ui version=&quot;4.0&quot;&gt;
   &lt;class&gt;MainWindow&lt;/class&gt;
   &lt;widget class=&quot;QMainWindow&quot; name=&quot;MainWindow&quot;&gt;
    &lt;property name=&quot;geometry&quot;&gt;
     &lt;rect&gt;
      &lt;x&gt;0&lt;/x&gt;
      &lt;y&gt;0&lt;/y&gt;
      &lt;width&gt;800&lt;/width&gt;
      &lt;height&gt;600&lt;/height&gt;
     &lt;/rect&gt;
    &lt;/property&gt;
    &lt;property name=&quot;windowTitle&quot;&gt;
     &lt;string&gt;MainWindow&lt;/string&gt;
    &lt;/property&gt;
    &lt;widget class=&quot;QWidget&quot; name=&quot;centralwidget&quot;&gt;
     &lt;layout class=&quot;QGridLayout&quot; name=&quot;gridLayout&quot;&gt;
      &lt;item row=&quot;0&quot; column=&quot;0&quot;&gt;
       &lt;widget class=&quot;QGraphicsView&quot; name=&quot;graphicsView&quot;/&gt;
      &lt;/item&gt;
     &lt;/layout&gt;
    &lt;/widget&gt;
    &lt;widget class=&quot;QMenuBar&quot; name=&quot;menubar&quot;&gt;
     &lt;property name=&quot;geometry&quot;&gt;
      &lt;rect&gt;
       &lt;x&gt;0&lt;/x&gt;
       &lt;y&gt;0&lt;/y&gt;
       &lt;width&gt;800&lt;/width&gt;
       &lt;height&gt;21&lt;/height&gt;
      &lt;/rect&gt;
     &lt;/property&gt;
    &lt;/widget&gt;
    &lt;widget class=&quot;QStatusBar&quot; name=&quot;statusbar&quot;/&gt;
   &lt;/widget&gt;
   &lt;resources/&gt;
   &lt;connections/&gt;
  &lt;/ui&gt;
  </code></pre>