eric6_configure.py

changeset 6630
bddd12f27a4c
parent 6101
b854a825d483
child 6645
ad476851d7e0
equal deleted inserted replaced
6629:643ec3a53d17 6630:bddd12f27a4c
35 os.makedirs(settingsDir) 35 os.makedirs(settingsDir)
36 QSettings.setPath(QSettings.IniFormat, QSettings.UserScope, 36 QSettings.setPath(QSettings.IniFormat, QSettings.UserScope,
37 settingsDir) 37 settingsDir)
38 sys.argv.remove(arg) 38 sys.argv.remove(arg)
39 39
40 from Globals import qVersionTuple
41 if qVersionTuple() < (5, 6, 0):
42 WEBENGINE_AVAILABLE = False
43 else:
44 try:
45 from PyQt5 import QtWebEngineWidgets # __IGNORE_WARNING__
46 WEBENGINE_AVAILABLE = True
47 except ImportError:
48 WEBENGINE_AVAILABLE = False
49
50 # make ThirdParty package available as a packages repository 40 # make ThirdParty package available as a packages repository
51 sys.path.insert(2, os.path.join(os.path.dirname(__file__), 41 sys.path.insert(2, os.path.join(os.path.dirname(__file__),
52 "ThirdParty", "Pygments")) 42 "ThirdParty", "Pygments"))
53 sys.path.insert(2, os.path.join(os.path.dirname(__file__), 43 sys.path.insert(2, os.path.join(os.path.dirname(__file__),
54 "ThirdParty", "EditorConfig")) 44 "ThirdParty", "EditorConfig"))
64 54
65 @param argv list of commandline parameters (list of strings) 55 @param argv list of commandline parameters (list of strings)
66 @return reference to the main widget (QWidget) 56 @return reference to the main widget (QWidget)
67 """ 57 """
68 from Preferences.ConfigurationDialog import ConfigurationWindow 58 from Preferences.ConfigurationDialog import ConfigurationWindow
69 w = ConfigurationWindow(webEngine=WEBENGINE_AVAILABLE) 59 w = ConfigurationWindow()
70 w.show() 60 w.show()
71 w.showConfigurationPageByName("empty") 61 w.showConfigurationPageByName("empty")
72 return w 62 return w
73 63
74 64

eric ide

mercurial