12 context menu to start the eric6 IDE and the eric6 tools. |
12 context menu to start the eric6 IDE and the eric6 tools. |
13 """ |
13 """ |
14 |
14 |
15 from __future__ import unicode_literals |
15 from __future__ import unicode_literals |
16 |
16 |
|
17 import sys |
|
18 |
|
19 PyQt4Option = "--pyqt4" in sys.argv |
|
20 |
17 import Toolbox.PyQt4ImportHook # __IGNORE_WARNING__ |
21 import Toolbox.PyQt4ImportHook # __IGNORE_WARNING__ |
18 |
22 |
19 try: # Only for Py2 |
23 try: # Only for Py2 |
20 import Utilities.compatibility_fixes # __IGNORE_WARNING__ |
24 import Utilities.compatibility_fixes # __IGNORE_WARNING__ |
21 except (ImportError): |
25 except (ImportError): |
22 pass |
26 pass |
23 |
|
24 import sys |
|
25 |
27 |
26 for arg in sys.argv: |
28 for arg in sys.argv: |
27 if arg.startswith("--config="): |
29 if arg.startswith("--config="): |
28 import Globals |
30 import Globals |
29 configDir = arg.replace("--config=", "") |
31 configDir = arg.replace("--config=", "") |
41 Function to create the main widget. |
43 Function to create the main widget. |
42 |
44 |
43 @param argv list of commandline parameters (list of strings) |
45 @param argv list of commandline parameters (list of strings) |
44 @return reference to the main widget (QWidget) |
46 @return reference to the main widget (QWidget) |
45 """ |
47 """ |
|
48 global PyQt4Option |
|
49 |
46 from Tools.TrayStarter import TrayStarter |
50 from Tools.TrayStarter import TrayStarter |
47 return TrayStarter() |
51 return TrayStarter(PyQt4Option) |
48 |
52 |
49 |
53 |
50 def main(): |
54 def main(): |
51 """ |
55 """ |
52 Main entry point into the application. |
56 Main entry point into the application. |