几天来,我一直在尝试编译 Qt 和 PyQt,但无法让它与在以前的 Qt/PyQt 版本中运行的软件一起工作。当我这样做时,可以重新创建错误,
from PyQt4 import QtCore
unicode(QtCore.QString())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'sip.methoddescriptor' object is not callable
如果我将 'utf-8' 添加到 unicode 命令第二个选项,它就可以工作
unicode(QtCore.QString(), "utf-8")
我尝试运行的软件进行了很多转换,我不想更改它们。真的卡在这里任何建议都会有所帮助。
CentOS 6.4
Qt 4.8.6
PyQt 4.11.2
SIP 4.16.3
Python 2.6.6
谢谢!