pyqt4pysideimporter.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:PortableApps.com-DevelopmentToolkit 作者: 3D1T0R 项目源码 文件源码
def load_pyqt4():
    """Sets up PyQt4 nicely to be PySide-compatible as much as possible."""
    # Kill off QString and QVariant to make it act properly like PySide
    import sip
    sip.setapi('QString', 2)
    sip.setapi('QVariant', 2)

    from PyQt4 import QtCore
    QtCore._QT_ENGINE = 'PyQt4'

    # Also rename the pyqt things for compatibility.
    QtCore.Signal = QtCore.pyqtSignal
    QtCore.Slot = QtCore.pyqtSlot
    QtCore.Property = QtCore.pyqtProperty

    global IS_PYQT4
    IS_PYQT4 = True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号