eric7/Project/UicLoadUi5.py

branch
eric7
changeset 8551
5611421bc868
parent 8318
962bce857696
child 8881
54e42bc2437a
equal deleted inserted replaced
8550:575e640836b2 8551:5611421bc868
12 import json 12 import json
13 import xml.etree.ElementTree # secok 13 import xml.etree.ElementTree # secok
14 import contextlib 14 import contextlib
15 15
16 try: 16 try:
17 from PyQt6.QtCore import QMetaMethod, QByteArray 17 from PyQt5.QtCore import QMetaMethod, QByteArray
18 from PyQt6.QtGui import QAction 18 from PyQt5.QtGui import QAction
19 from PyQt6.QtWidgets import QWidget, QApplication 19 from PyQt5.QtWidgets import QWidget, QApplication
20 from PyQt6 import uic 20 from PyQt5 import uic
21 except ImportError: 21 except ImportError:
22 print("PyQt5 could not be found.") 22 print("PyQt5 could not be found.")
23 sys.exit(1) 23 sys.exit(1)
24 24
25 with contextlib.suppress(ImportError): 25 with contextlib.suppress(ImportError):
26 from PyQt6 import QtWebEngineWidgets # __IGNORE_WARNING__ 26 from PyQt5 import QtWebEngineWidgets # __IGNORE_WARNING__
27 27
28 sys.path.append(os.path.dirname(os.path.dirname(__file__))) 28 sys.path.append(os.path.dirname(os.path.dirname(__file__)))
29 # add the eric package directory 29 # add the eric package directory
30 30
31 31

eric ide

mercurial