eric6/Project/UicLoadUi5.py

branch
maintenance
changeset 8273
698ae46f40a4
parent 8176
31965986ecd1
parent 8240
93b8a353c4bf
equal deleted inserted replaced
8190:fb0ef164f536 8273:698ae46f40a4
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