code: def get_QApplication(args=[]):
      
      global _qapp
      if _qapp is None:
          QCoreApplication.setAttribute(Qt.AA_X11InitThreads)
          _qapp = QApplication(args)
  
      return _qapp
docs: Returns the QApplication instance, creating it is does not yet exist.