eric6/Project/UicLoadUi5.py

changeset 8240
93b8a353c4bf
parent 8143
2c730d5fd177
child 8273
698ae46f40a4
equal deleted inserted replaced
8239:59a9a658618c 8240:93b8a353c4bf
9 9
10 import os 10 import os
11 import sys 11 import sys
12 import json 12 import json
13 import xml.etree.ElementTree # secok 13 import xml.etree.ElementTree # secok
14 import contextlib
14 15
15 try: 16 try:
16 from PyQt5.QtCore import QMetaMethod, QByteArray 17 from PyQt5.QtCore import QMetaMethod, QByteArray
17 from PyQt5.QtWidgets import QAction, QWidget, QApplication 18 from PyQt5.QtWidgets import QAction, QWidget, QApplication
18 from PyQt5 import uic 19 from PyQt5 import uic
19 except ImportError: 20 except ImportError:
20 print("PyQt5 could not be found.") 21 print("PyQt5 could not be found.")
21 sys.exit(1) 22 sys.exit(1)
22 23
23 try: 24 with contextlib.suppress(ImportError):
24 from PyQt5 import QtWebEngineWidgets # __IGNORE_WARNING__ 25 from PyQt5 import QtWebEngineWidgets # __IGNORE_WARNING__
25 except ImportError:
26 pass
27 26
28 sys.path.append(os.path.dirname(os.path.dirname(__file__))) 27 sys.path.append(os.path.dirname(os.path.dirname(__file__)))
29 # add the eric package directory 28 # add the eric package directory
30 29
31 30

eric ide

mercurial