def get_main_app(argv=[]):
 app = QApplication(argv)
 app.setApplicationName(__appname__)
 app.setWindowIcon(newIcon('app'))
 win = MainWindow((argv[1] if (len(argv) == 2) else None))
 win.show()
 return (app, win)

def get_main_app ( argv = [ ] ) : app = QApplication ( argv ) app . setApplicationName ( __appname__ ) app . setWindowIcon ( newIcon ( 'app' ) ) win = MainWindow ( ( argv [ 1 ] if ( len ( argv ) == 2 ) else None ) ) win . show ( ) return ( app , win )
standard boilerplate qt application code .