original_docstring: 
          To be able to handle both the user calling quit and clicking the close button,
          we hijack the window close event and handle it in the window's controller
          (`Viewer`).
          
docstring: To be able to handle both the user calling quit and clicking the close button,
  we hijack the window close event and handle it in the window's controller
  (`Viewer`).
docstring_tokens: To be able to handle both the user calling quit and clicking the close button we hijack the window close event and handle it in the window ' s controller ( ` Viewer ` ) .
code: def closeEvent(self, event: QCloseEvent) -> None:
          """
          To be able to handle both the user calling quit and clicking the close button,
          we hijack the window close event and handle it in the window's controller
          (`Viewer`).
          """
  
          self.aboutToClose.emit(event)
code_tokens: def closeEvent ( self , event : QCloseEvent ) -> None : self . aboutToClose . emit ( event )
short_docstring: To be able to handle both the user calling quit and clicking the close button,
  we hijack the window close event and handle it in the window's controller
  (`Viewer`).
short_docstring_tokens: To be able to handle both the user calling quit and clicking the close button we hijack the window close event and handle it in the window ' s controller ( ` Viewer ` ) .
comment: """
          To be able to handle both the user calling quit and clicking the close button,
          we hijack the window close event and handle it in the window's controller
          (`Viewer`).
          """