0

I have a mainwindow containing many dockwidget, toolbars,and menubars. I am able to toggle the visibility of dockwidgets and toolbars but not the menubars. Why does not the below code work? Is it possible to view only the central widget of a QMainWindow as full screen in PyQt by hiding the menubars?

class MainWindow(QMainWindow):

 def __init__(self, parent=None):
    super(MainWindow, self).__init__(parent)
    self.local_grview = QGraphicsView()
    self.local_grview.setSceneRect(0,0,200,200)
    self.setCentralWidget(self.local_grview)

 def fullscreen(self):
    self.hide()
    self.setParent(None)
    self.local_grview.showFullScreen()
    self.local_grview.show()
honeybadger
  • 1,465
  • 1
  • 19
  • 32

0 Answers0