eric6_tray.py

branch
maintenance
changeset 6646
51eefa621de4
parent 6645
ad476851d7e0
equal deleted inserted replaced
6603:77189681b787 6646:51eefa621de4
1 #!/usr/bin/env python3 1 #!/usr/bin/env python3
2 # -*- coding: utf-8 -*- 2 # -*- coding: utf-8 -*-
3 3
4 # Copyright (c) 2006 - 2018 Detlev Offenbach <detlev@die-offenbachs.de> 4 # Copyright (c) 2006 - 2019 Detlev Offenbach <detlev@die-offenbachs.de>
5 # 5 #
6 6
7 """ 7 """
8 Eric6 Tray. 8 Eric6 Tray.
9 9
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.

eric ide

mercurial