【发布时间】:2014-02-10 12:03:18
【问题描述】:
我在使用信号和插槽时遇到问题,使用按钮触发调用“gc.speed_rpm”的事件(使用的已定义插槽,或我自己的方法/函数)并在文本浏览器上显示它的输出小部件。
QtCore.QObject.connect(self.pushButton, QtCore.SIGNAL(_fromUtf8("clicked()")), self.textBrowser_2, gc.speed_rpm)
我收到以下错误:
arguments did not match any overloaded call:
QObject.connect(QObject, SIGNAL(), QObject, SLOT(), Qt.ConnectionType=Qt.AutoConnection): argument 4 has unexpected type 'instancemethod'
QObject.connect(QObject, SIGNAL(), callable, Qt.ConnectionType=Qt.AutoConnection): argument 3 has unexpected type 'QTextBrowser'
会出什么问题?任何想法。
提前致谢。
【问题讨论】:
-
考虑使用新风格的信号和槽。 eli.thegreenplace.net/2011/04/24/…
标签: pyqt