'Sets a QGraphicsWidget to automatically fill the entire view (the item will be automatically
resize whenever the GraphicsView is resized).'

def setCentralWidget(self, item):

    if (self.centralWidget is not None):
        self.scene().removeItem(self.centralWidget)
    self.centralWidget = item
    if (item is not None):
        self.sceneObj.addItem(item)
        self.resizeEvent(None)
