Utilities/Startup.py

branch
5_0_x
changeset 514
a3e454b3293d
parent 265
5805c2e1415b
child 792
a13346916170
--- a/Utilities/Startup.py	Thu Aug 12 10:07:38 2010 +0200
+++ b/Utilities/Startup.py	Sat Aug 28 18:32:51 2010 +0200
@@ -195,7 +195,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.
     
@@ -211,9 +212,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