What is a difference between these two clicked() signals in PyQt?
问题 QtCore.QObject.connect(my_button, QtCore.SIGNAL('clicked()'), my_func) and my_button.clicked.connect(my_func) I usually use the first option, but then I found the second one and want to know what is a difference between them. 回答1: The first option is the old-style signal and slot syntax, which is now obsolete. You can still use it in PyQt4, but it is not supported at all in PyQt5. The second option is the new-style signal and slot syntax, which can be used in PyQt5 and all recent versions of