10 from __future__ import unicode_literals |
10 from __future__ import unicode_literals |
11 |
11 |
12 import os |
12 import os |
13 import sys |
13 import sys |
14 |
14 |
15 from PyQt5.QtCore import Qt, QTranslator, QLocale, QLibraryInfo, QDir, \ |
15 from PyQt5.QtCore import QTranslator, QLocale, QLibraryInfo, QDir, QTextCodec |
16 QTextCodec, QCoreApplication |
|
17 from PyQt5.QtWidgets import QApplication |
16 from PyQt5.QtWidgets import QApplication |
18 |
17 |
19 from E5Gui.E5Application import E5Application |
18 from E5Gui.E5Application import E5Application |
20 |
19 |
21 import Globals |
20 import Globals |
221 handler dialog (boolean) |
220 handler dialog (boolean) |
222 @return exit result (integer) |
221 @return exit result (integer) |
223 """ |
222 """ |
224 handleArgs(argv, appinfo) |
223 handleArgs(argv, appinfo) |
225 if app is None: |
224 if app is None: |
226 try: |
|
227 QCoreApplication.setAttribute(Qt.AA_ShareOpenGLContexts, True) |
|
228 except AttributeError: |
|
229 pass |
|
230 # set the library paths for plugins |
225 # set the library paths for plugins |
231 setLibraryPaths() |
226 setLibraryPaths() |
232 app = E5Application(argv) |
227 app = E5Application(argv) |
233 app.setQuitOnLastWindowClosed(quitOnLastWindowClosed) |
228 app.setQuitOnLastWindowClosed(quitOnLastWindowClosed) |
234 |
229 |