eric6/Project/UicLoadUi6.py

branch
maintenance
changeset 8273
698ae46f40a4
parent 8142
43248bafe9b2
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 PyQt6.QtCore import QMetaMethod, QByteArray 17 from PyQt6.QtCore import QMetaMethod, QByteArray
17 from PyQt6.QtGui import QAction 18 from PyQt6.QtGui import QAction
18 from PyQt6.QtWidgets import QWidget, QApplication 19 from PyQt6.QtWidgets import QWidget, QApplication
19 from PyQt6 import uic 20 from PyQt6 import uic
20 except ImportError: 21 except ImportError:
21 print("PyQt6 could not be found.") 22 print("PyQt6 could not be found.")
22 sys.exit(1) 23 sys.exit(1)
23 24
24 try: 25 with contextlib.suppress(ImportError):
25 from PyQt6 import QtWebEngineWidgets # __IGNORE_WARNING__ 26 from PyQt6 import QtWebEngineWidgets # __IGNORE_WARNING__
26 except ImportError:
27 pass
28 27
29 sys.path.append(os.path.dirname(os.path.dirname(__file__))) 28 sys.path.append(os.path.dirname(os.path.dirname(__file__)))
30 # add the eric package directory 29 # add the eric package directory
31 30
32 31

eric ide

mercurial