Why does pyqtSlot decorator cause “TypeError: connect() failed”?

后端 未结 2 616
慢半拍i
慢半拍i 2021-01-12 12:20

I have this Python 3.5.1 program with PyQt5 and a GUI created from a QtCreator ui file where the pyqtSlot decorator causes \"TypeError: connect() failed between textChanged(

2条回答
  •  长情又很酷
    2021-01-12 12:52

    Why do you want to use @pyqtSlot?

    The reason it fails is that LineEditHandler is not a QObject. What @pyqtSlot does is basically creating a real Qt slot instead of internally using a proxy object (which is the default behavior without @pyqtSlot).

提交回复
热议问题