#NEWLINE# def initMenubar( self ) : #NEWLINE# #INDENT# menubar = self . menuBar ( ) #NEWLINE# file = menubar . addMenu ( 'File' ) #NEWLINE# edit = menubar . addMenu ( 'Edit' ) #NEWLINE# view = menubar . addMenu ( 'View' ) #NEWLINE# file . addAction ( self . newAction ) #NEWLINE# file . addAction ( self . openAction ) #NEWLINE# file . addAction ( self . saveAction ) #NEWLINE# file . addAction ( self . printAction ) #NEWLINE# file . addAction ( self . previewAction ) #NEWLINE# edit . addAction ( self . undoAction ) #NEWLINE# edit . addAction ( self . redoAction ) #NEWLINE# edit . addAction ( self . cutAction ) #NEWLINE# edit . addAction ( self . copyAction ) #NEWLINE# edit . addAction ( self . pasteAction ) #NEWLINE# edit . addAction ( self . findAction ) #NEWLINE# toolbarAction = QtWidgets . QAction ( 'Toggle Toolbar' , self ) #NEWLINE# toolbarAction . triggered . connect ( self . toggleToolbar ) #NEWLINE# formatbarAction = QtWidgets . QAction ( 'Toggle Formatbar' , self ) #NEWLINE# formatbarAction . triggered . connect ( self . toggleFormatbar ) #NEWLINE# statusbarAction = QtWidgets . QAction ( 'Toggle Statusbar' , self ) #NEWLINE# statusbarAction . triggered . connect ( self . toggleStatusbar ) #NEWLINE# view . addAction ( toolbarAction ) #NEWLINE# view . addAction ( formatbarAction ) #NEWLINE# view . addAction ( statusbarAction )