40 os.makedirs(SettingsDir) |
40 os.makedirs(SettingsDir) |
41 QSettings.setPath(QSettings.IniFormat, QSettings.UserScope, |
41 QSettings.setPath(QSettings.IniFormat, QSettings.UserScope, |
42 SettingsDir) |
42 SettingsDir) |
43 sys.argv.remove(arg) |
43 sys.argv.remove(arg) |
44 |
44 |
45 from Globals import qVersionTuple |
|
46 if qVersionTuple() < (5, 6, 0): |
|
47 WEBENGINE_AVAILABLE = False |
|
48 else: |
|
49 try: |
|
50 from PyQt5 import QtWebEngineWidgets # __IGNORE_WARNING__ |
|
51 WEBENGINE_AVAILABLE = True |
|
52 except ImportError: |
|
53 WEBENGINE_AVAILABLE = False |
|
54 |
|
55 from Globals import AppInfo |
45 from Globals import AppInfo |
56 |
46 |
57 from Toolbox import Startup |
47 from Toolbox import Startup |
58 |
48 |
59 |
49 |
63 |
53 |
64 @param argv list of commandline parameters (list of strings) |
54 @param argv list of commandline parameters (list of strings) |
65 @return reference to the main widget (QWidget) |
55 @return reference to the main widget (QWidget) |
66 """ |
56 """ |
67 from Tools.TrayStarter import TrayStarter |
57 from Tools.TrayStarter import TrayStarter |
68 return TrayStarter(PyQt4Option, SettingsDir, webEngine=WEBENGINE_AVAILABLE) |
58 return TrayStarter(PyQt4Option, SettingsDir) |
69 |
59 |
70 |
60 |
71 def main(): |
61 def main(): |
72 """ |
62 """ |
73 Main entry point into the application. |
63 Main entry point into the application. |