[PyQt] No match to overloaded signal
Jeremy Sanders
jeremy at jeremysanders.net
Thu Apr 9 13:45:42 BST 2015
Hi -
Is this an intentional difference between PyQt4 and 5? The PyQt4 version
works, but PyQt5 gives the error:
Traceback (most recent call last):
File "test.py", line 16, in <module>
p.clicked[()].connect(func)
KeyError: 'there is no matching overloaded signal'
Here is the program:
import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *
#from PyQt5.QtCore import *
#from PyQt5.QtWidgets import *
app = QApplication(sys.argv)
def func():
print('clicked')
p = QPushButton('Button')
p.clicked[()].connect(func)
p.show()
app.exec_()
Thanks
Jeremy
More information about the PyQt
mailing list