Utilities/Startup.py

changeset 513
a5329d7867c5
parent 500
c3abc7895a01
child 564
b3d966393ba9
diff -r 4d765043b3ce -r a5329d7867c5 Utilities/Startup.py
--- a/Utilities/Startup.py	Sat Aug 28 18:28:18 2010 +0200
+++ b/Utilities/Startup.py	Sat Aug 28 18:30:09 2010 +0200
@@ -194,7 +194,8 @@
         loc = None
     return loc
 
-def simpleAppStartup(argv, appinfo, mwFactory, quitOnLastWindowClosed = True):
+def simpleAppStartup(argv, appinfo, mwFactory, quitOnLastWindowClosed = True, 
+    app = None):
     """
     Module function to start up an application that doesn't need a specialized start up.
     
@@ -210,9 +211,11 @@
         </dl>
     @keyparam quitOnLastWindowClosed flag indicating to quit the application,
         if the last window was closed (boolean)
+    @keyparam app reference to the application object (QApplication or None)
     """
     handleArgs(argv, appinfo)
-    app = E5Application(argv)
+    if app is None:
+        app = E5Application(argv)
     app.setQuitOnLastWindowClosed(quitOnLastWindowClosed)
     
     setLibraryPaths()

eric ide

mercurial