title: PyQt: Scrollbars are not shown with QGraphicsView class being nested under QMainWindow
body: <p>I am supposed to add scrollbars to the screen. The class design shown below is the part of a software that I am supposed to modify and add scrollbars to. The scroll bar code in Window class has been added by me.</p>
  
  <p>It doesn't get shown when I run the program. What am I supposed to correct?</p>
  
  <pre><code>import sys
  
  from PyQt4 import QtGui
  from PyQt4 import QtCore
  
  class Window(QtGui.QGraphicsView):
  
    def __init__(self, parent=None):
  
          QtGui.QGraphicsView.__init__(self, parent)
          self.scene = QtGui.QGraphicsScene(self)
          self.scene.setBackgroundBrush(QtGui.QBrush(QtCore.Qt.darkGray, QtCore.Qt.SolidPattern))
          self.setScene(self.scene)
  
          self.setDragMode(QtGui.QGraphicsView.ScrollHandDrag)
          self.setTransformationAnchor(QtGui.QGraphicsView.AnchorUnderMouse)
          self.viewport().setCursor(QtCore.Qt.CrossCursor)
          self.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn)
          self.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn)
  
  
  class CityscapesLabelTool(QtGui.QMainWindow):
      def __init__(self, parent=None):
  
          QtGui.QMainWindow.__init__(self, parent)
  
          Window()
  
  app = QtGui.QApplication(sys.argv)
  GUI = CityscapesLabelTool()
  GUI.show()
  sys.exit(app.exec_())
  </code></pre>