PySide PyQt 版本基本兼容处理

PySide PyQt 版本基本兼容处理

# -*- coding: utf-8 -*-

try:
    from PySide import QtCore, QtGui
    from PySide import QtGui as QtWidgets
except:
    from PySide2 import QtWidgets, QtCore, QtGui
    
try:
    try:
        import shiboken
    except:
        from PySide import shiboken    
except:
    try:
        import shiboken2 as shiboken
    except:
        from PySide2 import shiboken2 as shiboken

 

posted @ 2021-05-19 10:55  ibingshan  阅读(351)  评论(0编辑  收藏  举报