0
我很困惑。我在Ubuntu 13.10下使用Python3運行PySide。 我無法通過一個簡單的任務,其中我的測試套件發生錯誤;我把問題縮小到雙線:PySide&Python3:QAction上的TypeError
from PySide.QtGui import QAction
a = QAction("Test")
這就是它。如果我只是在/ usr/bin中/ python3解釋(V3.3.2)直接運行這兩條線,它在喊我:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'PySide.QtGui.QAction' called with wrong argument types:
PySide.QtGui.QAction(str)
Supported signatures:
PySide.QtGui.QAction(PySide.QtCore.QObject)
PySide.QtGui.QAction(PySide.QtGui.QIcon, unicode, PySide.QtCore.QObject)
PySide.QtGui.QAction(unicode, PySide.QtCore.QObject)
我真的不知道這應該意味着。我認爲Python3中的所有(str)字符串都是unicode。 Qhy PySide是否抱怨沒有隱式地使用相同的類型(str < => unicode)?
任何幫助歡迎,我迷失在這裏。