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
pyqt4pysideimporter.py 文件源码
python
阅读 27
收藏 0
点赞 0
评论 0
评论列表
文章目录