Do not emit loadUiType warning for pyside2 5.14.2.2

This commit is contained in:
Ogi 2020-06-03 20:18:17 -07:00
parent ab96ca1d30
commit f8c107e7b2

View File

@ -119,7 +119,8 @@ def _loadUiType(uiFile):
# convert ui file to python code
if pysideuic is None:
if PySide2.__version__[:5].split('.')[:2] == ['5', '14']:
pyside2version = tuple(map(int, PySide2.__version__.split(".")))
if pyside2version >= (5, 14) and pyside2version < (5, 14, 2, 2):
warnings.warn('For UI compilation, it is recommended to upgrade to PySide >= 5.15')
uipy = subprocess.check_output(['pyside2-uic', uiFile])
else: