(self, event)
Window closed
            save stuff or whatever at exit

            detaches dwarf
Window closed
            save stuff or whatever at exit
Window closed save stuff or whatever at exit
def closeEvent(self, event):
        """ Window closed
            save stuff or whatever at exit

            detaches dwarf
        """
        if self.session_manager.session:
            self.session_manager.session.stop()

        # save windowstuff
        self.q_settings.setValue('dwarf_ui_state', self.saveGeometry())
        self.q_settings.setValue('dwarf_ui_window', self.saveState())

        if self.dwarf:
            try:
                self.dwarf.detach()
            except:
                pass
        super().closeEvent(event)
def closeEvent ( self , event ) : if self . session_manager . session : self . session_manager . session . stop ( ) # save windowstuff self . q_settings . setValue ( 'dwarf_ui_state' , self . saveGeometry ( ) ) self . q_settings . setValue ( 'dwarf_ui_window' , self . saveState ( ) ) if self . dwarf : try : self . dwarf . detach ( ) except : pass super ( ) . closeEvent ( event )